Skip to content

Commit

Permalink
simplify for reproducer
Browse files Browse the repository at this point in the history
  • Loading branch information
freibold committed Sep 9, 2024
1 parent d80fb88 commit c3011e4
Show file tree
Hide file tree
Showing 5 changed files with 112 additions and 110 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ x64
kernels/config.h
kernels/hash.h
include/embree4/rtcore_config.h
build
build*
out
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ OPTION(EMBREE_STAT_COUNTERS "Enables statistic counters.")
OPTION(EMBREE_STACK_PROTECTOR "When enabled Embree compiles with stack protection against return address overrides." OFF)

IF (NOT APPLE)
OPTION(EMBREE_SYCL_SUPPORT "Enables SYCL GPU support." OFF)
OPTION(EMBREE_SYCL_SUPPORT "Enables SYCL GPU support." ON)
ENDIF()
CMAKE_DEPENDENT_OPTION(EMBREE_SYCL_LARGEGRF "Enables SYCL large GRF support." OFF "EMBREE_SYCL_SUPPORT" OFF)
CMAKE_DEPENDENT_OPTION(EMBREE_SYCL_DBG "Enables DPC++ debug info." OFF "EMBREE_SYCL_SUPPORT" OFF)
Expand Down Expand Up @@ -243,7 +243,7 @@ ELSEIF(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" OR CMAKE_SYSTEM_PROCESSOR STREQ
SET(EMBREE_ARM ON)
ENDIF()

SET(EMBREE_TASKING_SYSTEM "TBB" CACHE STRING "Selects tasking system")
SET(EMBREE_TASKING_SYSTEM "INTERNAL" CACHE STRING "Selects tasking system")
SET(EMBREE_TBB_COMPONENT "tbb" CACHE STRING "The TBB component/library name.")

IF (WIN32)
Expand Down Expand Up @@ -389,6 +389,8 @@ ELSE()
SET_PROPERTY(CACHE EMBREE_MAX_ISA PROPERTY STRINGS NONE SSE2 SSE4.2 AVX AVX2 AVX512 DEFAULT)
ENDIF()

SET(EMBREE_MAX_ISA "SSE2")

IF (EMBREE_MAX_ISA STREQUAL "NONE")

IF (EMBREE_ARM)
Expand Down
20 changes: 10 additions & 10 deletions common/cmake/dpcpp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ IF (EMBREE_SYCL_SUPPORT)
SET(CMAKE_CXX_FLAGS_SYCL "-fsycl -fsycl-unnamed-lambda -Xclang -fsycl-allow-func-ptr")
SET(CMAKE_CXX_FLAGS_SYCL "${CMAKE_CXX_FLAGS_SYCL} -Wno-mismatched-tags -Wno-pessimizing-move -Wno-reorder -Wno-unneeded-internal-declaration -Wno-delete-non-abstract-non-virtual-dtor -Wno-dangling-field -Wno-unknown-pragmas -Wno-logical-op-parentheses")

IF (SYCL_ONEAPI_ICX AND WIN32)
SET(CMAKE_CXX_FLAGS_SYCL "${CMAKE_CXX_FLAGS_SYCL} /debug:none") # FIXME: debug information generation takes forever in SYCL
SET(CMAKE_CXX_FLAGS_SYCL "${CMAKE_CXX_FLAGS_SYCL} /DNDEBUG") # FIXME: debug information generation takes forever in SYCL
ELSE()
SET(CMAKE_CXX_FLAGS_SYCL "${CMAKE_CXX_FLAGS_SYCL} -g0") # FIXME: debug information generation takes forever in SYCL
#IF (SYCL_ONEAPI_ICX AND WIN32)
# SET(CMAKE_CXX_FLAGS_SYCL "${CMAKE_CXX_FLAGS_SYCL} /debug:none") # FIXME: debug information generation takes forever in SYCL
# SET(CMAKE_CXX_FLAGS_SYCL "${CMAKE_CXX_FLAGS_SYCL} /DNDEBUG") # FIXME: debug information generation takes forever in SYCL
#ELSE()
# SET(CMAKE_CXX_FLAGS_SYCL "${CMAKE_CXX_FLAGS_SYCL} -g0") # FIXME: debug information generation takes forever in SYCL
SET(CMAKE_CXX_FLAGS_SYCL "${CMAKE_CXX_FLAGS_SYCL} -UDEBUG -DNDEBUG") # FIXME: assertion still not working in SYCL
ENDIF()
#ENDIF()

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-bitwise-instead-of-logical") # disables "use of bitwise '&' with boolean operands" warning
SET(CMAKE_CXX_FLAGS_SYCL "${CMAKE_CXX_FLAGS_SYCL} -Wno-bitwise-instead-of-logical") # disables "use of bitwise '&' with boolean operands" warning
Expand Down Expand Up @@ -103,10 +103,10 @@ IF (EMBREE_SYCL_SUPPORT)
#LIST(APPEND CMAKE_IGC_OPTIONS "AssumeInt64Support=0") # Architecture with partial int64 still promote uniform arrays to registers
LIST(APPEND CMAKE_IGC_OPTIONS "VISAOptions=-scratchAllocForStackInKB 128 ") # this works around some IGC bug in spill compression

IF (CMAKE_BUILD_TYPE STREQUAL "Debug") # to allow printf inside indirectly callable function
LIST(APPEND CMAKE_IGC_OPTIONS "ForceInlineStackCallWithImplArg=0")
LIST(APPEND CMAKE_IGC_OPTIONS "EnableGlobalStateBuffer=1")
ENDIF()
#IF (CMAKE_BUILD_TYPE STREQUAL "Debug") # to allow printf inside indirectly callable function
# LIST(APPEND CMAKE_IGC_OPTIONS "ForceInlineStackCallWithImplArg=0")
# LIST(APPEND CMAKE_IGC_OPTIONS "EnableGlobalStateBuffer=1")
#ENDIF()

STRING(REPLACE ";" "," CMAKE_IGC_OPTIONS "${CMAKE_IGC_OPTIONS}")

Expand Down
126 changes: 63 additions & 63 deletions kernels/rthwif/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,68 +78,68 @@ endif()
# information we need when TASKING_TBB is used
set(TBB_TARGET tasking)

if (EMBREE_BUILDER_TBB_STATIC OR NOT TASKING_TBB)

####################################################################
# fetch TBB and build static version of it
set(TBB_TARGET tbb)
ADD_DEFINITIONS("-D_CRT_SECURE_NO_WARNINGS")

option(TBB_STRICT "Treat compiler warnings as errors" OFF)
option(TBB_TEST "Enable testing" OFF)
option(TBBMALLOC_BUILD "Enable tbbmalloc build" OFF)
SET(TBB_DIR OFF)
SET(BUILD_SHARED_LIBS OFF)

INCLUDE(FetchContent)

SET(FETCHCONTENT_QUIET OFF)

IF (NOT EMBREE_RTHWIF_TBB_GIT_REPOSITORY) # allow setting this externally
SET(EMBREE_RTHWIF_TBB_GIT_REPOSITORY "https://github.com/oneapi-src/oneTBB.git")
ENDIF()

FetchContent_Declare(
tbb_static
GIT_REPOSITORY ${EMBREE_RTHWIF_TBB_GIT_REPOSITORY}
GIT_TAG v2021.6.0
)

FetchContent_GetProperties(tbb_static)
if(NOT tbb_static_POPULATED)
FetchContent_Populate(tbb_static)
# We want to build tbb_static to link it into embree_rthwif, but don't want to
# install it as part of the Embree install targets.
add_subdirectory(${tbb_static_SOURCE_DIR} ${tbb_static_BINARY_DIR} EXCLUDE_FROM_ALL)
endif()

MARK_AS_ADVANCED(FETCHCONTENT_BASE_DIR)
MARK_AS_ADVANCED(FETCHCONTENT_FULLY_DISCONNECTED)
MARK_AS_ADVANCED(FETCHCONTENT_QUIET)
MARK_AS_ADVANCED(FETCHCONTENT_SOURCE_DIR_TBB_STATIC)
MARK_AS_ADVANCED(FETCHCONTENT_UPDATES_DISCONNECTED)
MARK_AS_ADVANCED(FETCHCONTENT_UPDATES_DISCONNECTED_TBB_STATIC)

MARK_AS_ADVANCED(TBB4PY_BUILD)
MARK_AS_ADVANCED(TBBMALLOC_BUILD)
MARK_AS_ADVANCED(TBB_BUILD)
MARK_AS_ADVANCED(TBB_CPF)
MARK_AS_ADVANCED(TBB_DISABLE_HWLOC_AUTOMATIC_SEARCH)
MARK_AS_ADVANCED(TBB_ENABLE_IPO)
MARK_AS_ADVANCED(TBB_EXAMPLES)
MARK_AS_ADVANCED(TBB_FIND_PACKAGE)
MARK_AS_ADVANCED(TBB_INSTALL_VARS)
MARK_AS_ADVANCED(TBB_NO_APPCONTAINER)
MARK_AS_ADVANCED(TBB_SANITIZE)
MARK_AS_ADVANCED(TBB_STRICT)
MARK_AS_ADVANCED(TBB_TEST)
MARK_AS_ADVANCED(TBB_TEST_SPEC)
MARK_AS_ADVANCED(TBB_VALGRIND_MEMCHECK)
MARK_AS_ADVANCED(TBB_WINDOWS_DRIVER)

ADD_DEFINITIONS(-DTASKING_TBB)
####################################################################
ENDIF()
#if (EMBREE_BUILDER_TBB_STATIC OR NOT TASKING_TBB)
#
# ####################################################################
# # fetch TBB and build static version of it
# set(TBB_TARGET tbb)
# ADD_DEFINITIONS("-D_CRT_SECURE_NO_WARNINGS")
#
# option(TBB_STRICT "Treat compiler warnings as errors" OFF)
# option(TBB_TEST "Enable testing" OFF)
# option(TBBMALLOC_BUILD "Enable tbbmalloc build" OFF)
# SET(TBB_DIR OFF)
# SET(BUILD_SHARED_LIBS OFF)
#
# INCLUDE(FetchContent)
#
# SET(FETCHCONTENT_QUIET OFF)
#
# IF (NOT EMBREE_RTHWIF_TBB_GIT_REPOSITORY) # allow setting this externally
# SET(EMBREE_RTHWIF_TBB_GIT_REPOSITORY "https://github.com/oneapi-src/oneTBB.git")
# ENDIF()
#
# FetchContent_Declare(
# tbb_static
# GIT_REPOSITORY ${EMBREE_RTHWIF_TBB_GIT_REPOSITORY}
# GIT_TAG v2021.6.0
# )
#
# FetchContent_GetProperties(tbb_static)
# if(NOT tbb_static_POPULATED)
# FetchContent_Populate(tbb_static)
# # We want to build tbb_static to link it into embree_rthwif, but don't want to
# # install it as part of the Embree install targets.
# add_subdirectory(${tbb_static_SOURCE_DIR} ${tbb_static_BINARY_DIR} EXCLUDE_FROM_ALL)
# endif()
#
# MARK_AS_ADVANCED(FETCHCONTENT_BASE_DIR)
# MARK_AS_ADVANCED(FETCHCONTENT_FULLY_DISCONNECTED)
# MARK_AS_ADVANCED(FETCHCONTENT_QUIET)
# MARK_AS_ADVANCED(FETCHCONTENT_SOURCE_DIR_TBB_STATIC)
# MARK_AS_ADVANCED(FETCHCONTENT_UPDATES_DISCONNECTED)
# MARK_AS_ADVANCED(FETCHCONTENT_UPDATES_DISCONNECTED_TBB_STATIC)
#
# MARK_AS_ADVANCED(TBB4PY_BUILD)
# MARK_AS_ADVANCED(TBBMALLOC_BUILD)
# MARK_AS_ADVANCED(TBB_BUILD)
# MARK_AS_ADVANCED(TBB_CPF)
# MARK_AS_ADVANCED(TBB_DISABLE_HWLOC_AUTOMATIC_SEARCH)
# MARK_AS_ADVANCED(TBB_ENABLE_IPO)
# MARK_AS_ADVANCED(TBB_EXAMPLES)
# MARK_AS_ADVANCED(TBB_FIND_PACKAGE)
# MARK_AS_ADVANCED(TBB_INSTALL_VARS)
# MARK_AS_ADVANCED(TBB_NO_APPCONTAINER)
# MARK_AS_ADVANCED(TBB_SANITIZE)
# MARK_AS_ADVANCED(TBB_STRICT)
# MARK_AS_ADVANCED(TBB_TEST)
# MARK_AS_ADVANCED(TBB_TEST_SPEC)
# MARK_AS_ADVANCED(TBB_VALGRIND_MEMCHECK)
# MARK_AS_ADVANCED(TBB_WINDOWS_DRIVER)
#
# ADD_DEFINITIONS(-DTASKING_TBB)
# ####################################################################
#ENDIF()

IF (RTHWIF_STANDALONE)
include(package_ze_raytracing)
Expand Down Expand Up @@ -176,7 +176,7 @@ IF (EMBREE_STATIC_LIB OR NOT EMBREE_RTHWIF_STATIC_LIB)
ENDIF()
ENDIF()

ADD_SUBDIRECTORY(testing)
#ADD_SUBDIRECTORY(testing)



68 changes: 34 additions & 34 deletions tutorials/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/README.md.in" "${CMAKE_CURRENT_SOURC
INSTALL(FILES "${CMAKE_CURRENT_SOURCE_DIR}/README.md" DESTINATION "src" COMPONENT examples)

ADD_SUBDIRECTORY(common/image)
CMAKE_DEPENDENT_OPTION(EMBREE_TUTORIALS_GLFW "Enables GLFW usage in tutorials. When disabled tutorial can only render to disk." ON "EMBREE_TUTORIALS" OFF)
CMAKE_DEPENDENT_OPTION(EMBREE_TUTORIALS_GLFW "Enables GLFW usage in tutorials. When disabled tutorial can only render to disk." OFF "EMBREE_TUTORIALS" OFF)
CMAKE_DEPENDENT_OPTION(EMBREE_BUILD_GLFW_FROM_SOURCE "Builds GLFW from source." OFF "EMBREE_TUTORIALS_GLFW" OFF)

IF (EMBREE_TUTORIALS)
Expand Down Expand Up @@ -80,41 +80,41 @@ ENDIF()

ADD_SUBDIRECTORY(common)

ADD_SUBDIRECTORY(embree_info)
ADD_SUBDIRECTORY(minimal)
#ADD_SUBDIRECTORY(embree_info)
#ADD_SUBDIRECTORY(minimal)

ADD_SUBDIRECTORY(verify)
#ADD_SUBDIRECTORY(verify)
ADD_SUBDIRECTORY(triangle_geometry)
ADD_SUBDIRECTORY(dynamic_scene)
ADD_SUBDIRECTORY(voronoi)
ADD_SUBDIRECTORY(closest_point)
ADD_SUBDIRECTORY(user_geometry)
ADD_SUBDIRECTORY(viewer)
ADD_SUBDIRECTORY(instanced_geometry)
ADD_SUBDIRECTORY(multi_instanced_geometry)
ADD_SUBDIRECTORY(intersection_filter)
ADD_SUBDIRECTORY(pathtracer)
ADD_SUBDIRECTORY(hair_geometry)
ADD_SUBDIRECTORY(subdivision_geometry)
ADD_SUBDIRECTORY(displacement_geometry)
ADD_SUBDIRECTORY(grid_geometry)
ADD_SUBDIRECTORY(bvh_builder)
ADD_SUBDIRECTORY(lazy_geometry)
ADD_SUBDIRECTORY(bvh_access)
ADD_SUBDIRECTORY(quaternion_motion_blur)
ADD_SUBDIRECTORY(motion_blur_geometry)
ADD_SUBDIRECTORY(interpolation)
ADD_SUBDIRECTORY(curve_geometry)
ADD_SUBDIRECTORY(point_geometry)
ADD_SUBDIRECTORY(buildbench)
ADD_SUBDIRECTORY(convert)
ADD_SUBDIRECTORY(collide)
ADD_SUBDIRECTORY(next_hit)
ADD_SUBDIRECTORY(multiscene_geometry)
ADD_SUBDIRECTORY(ray_mask)
ADD_SUBDIRECTORY(forest)

ADD_SUBDIRECTORY(embree_tests)
#ADD_SUBDIRECTORY(dynamic_scene)
#ADD_SUBDIRECTORY(voronoi)
#ADD_SUBDIRECTORY(closest_point)
#ADD_SUBDIRECTORY(user_geometry)
#ADD_SUBDIRECTORY(viewer)
#ADD_SUBDIRECTORY(instanced_geometry)
#ADD_SUBDIRECTORY(multi_instanced_geometry)
#ADD_SUBDIRECTORY(intersection_filter)
#ADD_SUBDIRECTORY(pathtracer)
#ADD_SUBDIRECTORY(hair_geometry)
#ADD_SUBDIRECTORY(subdivision_geometry)
#ADD_SUBDIRECTORY(displacement_geometry)
#ADD_SUBDIRECTORY(grid_geometry)
#ADD_SUBDIRECTORY(bvh_builder)
#ADD_SUBDIRECTORY(lazy_geometry)
#ADD_SUBDIRECTORY(bvh_access)
#ADD_SUBDIRECTORY(quaternion_motion_blur)
#ADD_SUBDIRECTORY(motion_blur_geometry)
#ADD_SUBDIRECTORY(interpolation)
#ADD_SUBDIRECTORY(curve_geometry)
#ADD_SUBDIRECTORY(point_geometry)
#ADD_SUBDIRECTORY(buildbench)
#ADD_SUBDIRECTORY(convert)
#ADD_SUBDIRECTORY(collide)
#ADD_SUBDIRECTORY(next_hit)
#ADD_SUBDIRECTORY(multiscene_geometry)
#ADD_SUBDIRECTORY(ray_mask)
#ADD_SUBDIRECTORY(forest)
#
#ADD_SUBDIRECTORY(embree_tests)


ENDIF()

0 comments on commit c3011e4

Please sign in to comment.