Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frei/device memory support rebased #517

Open
wants to merge 54 commits into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
6a8d92d
fix wrong assert about maxTimeSegments.
freibold Sep 9, 2024
df51e32
fix missing sign-extension when using device memory for BVH data.
freibold Sep 18, 2024
ad7c524
BVH buffer in explicitly managed host/device memory on systems
freibold Sep 13, 2024
fec0830
triangle geometry is now host/device, scene next
freibold Sep 26, 2024
eebde99
All geom types work, spilling bug?
freibold Oct 16, 2024
2dc2db3
compile fixes
freibold Oct 24, 2024
fb70c9f
geometry data works
freibold Oct 28, 2024
7b7b2b2
add debug tutorial and restore state of other tutorials
freibold Oct 29, 2024
2f2e11e
scene is now in device memory, too. USM shared memory is now only
freibold Nov 6, 2024
0e2ab1e
introduced read only handle RTCTraversable which is accessible on
freibold Nov 11, 2024
4f649af
memory passing interface
freibold Nov 18, 2024
35bb8a7
rework buffer interface
freibold Nov 22, 2024
3a74ac0
test address sanitizer issue
freibold Nov 25, 2024
2989ea6
cleanups
freibold Nov 26, 2024
480bfbd
do not use ALIGNED_STRUCT_ macro for Scene and Geometry
freibold Nov 26, 2024
d71a086
port of multi_instanced_geometry tutorial to RTCTraversable
freibold Nov 26, 2024
1dd882e
port forest tutorial to new host/device memory support
freibold Nov 27, 2024
bc74365
change API naming for buffers form 'Ex' to 'HostDevice'
freibold Nov 27, 2024
e0d8de2
add ISPC API using RTCTraversable
freibold Nov 29, 2024
ba9c6f2
create CPP from ISPC tutorials
freibold Nov 29, 2024
09da49d
add padding to tree vertex and color data buffers for safe SIMD
freibold Dec 2, 2024
74c52ae
small fix for validation API
freibold Dec 2, 2024
f9a48f9
less alloc/free when creating device representation of scenen/geometry
freibold Dec 4, 2024
7e0655c
add sycl events for sychronization
freibold Dec 5, 2024
4d9da96
add cmake option for explicit host/device BVH data
freibold Dec 5, 2024
f47fa75
clear host scratch space for static scenes
freibold Dec 5, 2024
7ada277
rename host_device_memory tutorial and add CI tests
freibold Dec 5, 2024
f202294
refactor alloc. remove global (tls) SYCL context and device.
freibold Dec 9, 2024
cdb0b17
add nightly Windows multilevel test.
freibold Dec 9, 2024
c110544
update documentation for RTCBuffer
freibold Dec 9, 2024
cfed523
fix wrong deallocation in multi_instance_geometry tutorial.
freibold Dec 9, 2024
c0436a7
update rtcSet(New|Shared)GeometryBuffer(|HostDevice) documentation
freibold Dec 10, 2024
a1c7ab3
update rtcCommitScene(|WithQueue) documentation
freibold Dec 10, 2024
2b31357
rename memory types and account for host unified memory in buffer con…
freibold Dec 11, 2024
d34cb71
revert accidental changes in ray flag settings
freibold Dec 11, 2024
4b894ff
docu fixes
freibold Dec 11, 2024
81af3a2
change rtcCommit???WithQueue interface to return sycl::event
freibold Dec 11, 2024
f144ef3
make rtcCommitSceneWithQueue work with out-of-order SYCL queues, too
freibold Dec 11, 2024
2630ac3
updating general intro documentation
freibold Dec 11, 2024
e9f1a6d
documentation for ray queries using RTCTraversable
freibold Dec 11, 2024
749ffb1
more general documentation
freibold Dec 11, 2024
9a9d68c
add export filters for commit with queue API functions
freibold Dec 11, 2024
df467df
add CI test for BVH data in host device memory
freibold Dec 11, 2024
3d5a6ba
test new ICX version
freibold Dec 11, 2024
c782e31
changelog, typos
freibold Dec 11, 2024
e90e139
update internal Linux and Window driver in CI
freibold Dec 11, 2024
72f40aa
remove timing output from dynamic scene tutorial
freibold Dec 13, 2024
bb5d193
fix issues with host/device memory API on iGPU
freibold Dec 13, 2024
dcd35a0
fix blender segfault with geometry == NULL inside geometries array
dopitz Dec 16, 2024
6702c2b
removed internal rtas builder, made EMBREE_SYCL_L0_RTAS_BUILDER the d…
dopitz Jan 17, 2025
d3c165b
EMBREE_SYCL_BVH_DATA_HOST_DEVICE turned on by default now
dopitz Jan 22, 2025
b75cd82
Revert "EMBREE_SYCL_BVH_DATA_HOST_DEVICE turned on by default now"
dopitz Jan 22, 2025
3fd0584
documentation: rtcTraversable invalidation on rtcCommit
dopitz Jan 23, 2025
898a994
Removed files that got checked in by accident
stefanatwork Feb 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .github/workflows/continuous.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,38 @@ jobs:
cmake --preset linux-DG2-JIT-INTERNAL -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --build build --config Release --target test_package

linux-DG2-JIT-BVH-HOST-DEVICE-build:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
with:
image: embree/ubuntu:22.04
runs-on: '[ "Linux", "docker", "build" ]'
project: embree
dpcpp-version: intel-llvm/sycl-rel_5_2_0-rk
artifact-out: linux-DG2-JIT-BVH-HOST-DEVICE-build
artifact-path: ./build/*.tar.gz
cmd: |
module load cmake/3.25.3
cmake --preset linux-DG2-JIT-INTERNAL -DEMBREE_SYCL_BVH_DATA_HOST_DEVICE=ON -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --build build --config Release --target build

linux-DG2-JIT-BVH-HOST-DEVICE-test:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
needs: ["linux-DG2-JIT-BVH-HOST-DEVICE-build"]
with:
image: embree/ubuntu:22.04
options: --device=/dev/dri:/dev/dri
runs-on: '[ "Linux", "docker", "dg2" ]'
project: embree
env-from-files: ./.github/workflows/gfx-ubuntu22-internal.env
dpcpp-version: intel-llvm/sycl-rel_5_2_0-rk
artifact-in: linux-DG2-JIT-BVH-HOST-DEVICE-build
cmd: |
module load cmake/3.25.3
cmake --preset linux-DG2-JIT-INTERNAL -DEMBREE_SYCL_BVH_DATA_HOST_DEVICE=ON -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --build build --config Release --target test_package

linux-DG2-JIT-PUBLIC-build:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
Expand Down Expand Up @@ -301,6 +333,33 @@ jobs:
cmake --preset nightly-windows-DG2-JIT-ICX -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --build build --config Release --target test_package

windows-DG2-JIT-BVH-HOST-DEVICE-build:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main
with:
force-delete: true
runs-on: '[ "Windows", "NAS", "build" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env
artifact-out: windows-DG2-JIT-BVH-HOST-DEVICE-build
artifact-path: ./build/*.zip
cmd: |
cmake --preset windows-DG2-JIT-INTERNAL-L0RTAS -DEMBREE_SYCL_BVH_DATA_HOST_DEVICE=ON -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --build build --config Release --target build

windows-DG2-JIT-BVH-HOST-DEVICE-test:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main
needs: ["windows-DG2-JIT-BVH-HOST-DEVICE-build"]
with:
runs-on: '[ "Windows", "NAS", "dg2" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-windows-internal.env
artifact-in: windows-DG2-JIT-BVH-HOST-DEVICE-build
cmd: |
cmake --preset windows-DG2-JIT-INTERNAL-L0RTAS -DEMBREE_SYCL_BVH_DATA_HOST_DEVICE=ON -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --build build --config Release --target test_package

# ################################################################################
# ################################################################################
# # CPU tests
Expand Down Expand Up @@ -479,6 +538,7 @@ jobs:
runs-on: ubuntu-latest
needs:
- linux-DG2-JIT-INTERNAL-test
- linux-DG2-JIT-BVH-HOST-DEVICE-test
- linux-DG2-JIT-PUBLIC-test
- linux-DG2-JIT-PUBLIC-ICX-test
- linux-PVC-JIT-INTERNAL-test-1T
Expand All @@ -488,6 +548,7 @@ jobs:
- windows-DG2-JIT-PUBLIC-test
- windows-DG2-JIT-ICX-INTERNAL-test
- windows-DG2-JIT-ICX-PUBLIC-test
- windows-DG2-JIT-BVH-HOST-DEVICE-test
- linux-fedora29-CLANG4
- linux-fedora29-CLANG5-INT-ADDRSANITIZER
- linux-fedora29-ICX
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gfx-ubuntu22-internal.env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
GFX_DRIVER_VERSION=neo-builds/ci/master/ci-neo-master-030966/artifacts/linux/ubuntu/22.04
GFX_DRIVER_VERSION=neo-builds/ci/master/ci-neo-master-032074/artifacts/linux/ubuntu/22.04
2 changes: 1 addition & 1 deletion .github/workflows/gfx-windows-internal.env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
GFX_DRIVER_VERSION=gfx-driver-builds/ci/master/gfx-driver-ci-master-17345/artifacts/Windows
GFX_DRIVER_VERSION=gfx-driver-builds/ci/master/gfx-driver-ci-master-18078/artifacts/Windows
64 changes: 10 additions & 54 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,37 +51,6 @@ jobs:
cmake --preset nightly-linux-DG2-JIT-MULTILEVEL -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --build build --config Release --target test_package

nightly-linux-DG2-INTERNAL-L0RTAS-build:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
with:
image: embree/ubuntu:22.04
runs-on: '[ "Linux", "docker", "build" ]'
project: embree
dpcpp-version: intel-llvm/nightly-2023-12-18-rk
artifact-out: nightly-linux-DG2-INTERNAL-L0RTAS-build
artifact-path: ./build/*.tar.gz
cmd: |
module load cmake/3.25.3
cmake --preset nightly-linux-DG2-INTERNAL-L0RTAS -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --build build --config Release --target build

linux-DG2-JIT-INTERNAL-L0RTAS-test:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
needs: ["nightly-linux-DG2-INTERNAL-L0RTAS-build"]
with:
image: embree/ubuntu:22.04
options: --device=/dev/dri:/dev/dri
runs-on: '[ "Linux", "docker", "dg2" ]'
project: embree
env-from-files: ./.github/workflows/gfx-ubuntu22-public.env
artifact-in: nightly-linux-DG2-INTERNAL-L0RTAS-build
cmd: |
module load cmake/3.25.3
cmake --preset nightly-linux-DG2-INTERNAL-L0RTAS -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --build build --config Release --target test_package

linux-DG2-JIT-PUBLIC-sycl-RC-build:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
Expand Down Expand Up @@ -381,18 +350,6 @@ jobs:
cmake --preset nightly-windows-DG2-JIT -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=4
cmake --build build --config Release --target test_package

windows-DG2-JIT-INTERNAL-VALIDATION_API:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main
with:
runs-on: '[ "Windows", "NAS", "dg2" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-windows-public.env
cmd: |
python scripts/test.py configure platform:x64 compiler:dpcpp isa:SSE2 build:Release EMBREE_SYCL_SUPPORT:ON sycl:none rt_validation_api:ON implicit_dispatch_globals:OFF L0RTAS:OFF intensity:3 tasking:TBB2020.3
python scripts/test.py build
python scripts/test.py test

windows-DG2-JIT-sycl-RC-build:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main
Expand Down Expand Up @@ -421,31 +378,30 @@ jobs:
cmake --preset nightly-windows-DG2-JIT -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --build build --config Release --target test_package

windows-DG2-JIT-INTERNAL-L0RTAS-build:
nightly-windows-DG2-MULTILEVEL-build:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main
with:
force-delete: true
runs-on: '[ "Windows", "NAS", "build" ]'
runs-on: '[ "Windows", "NAS", "dg2" ]'
project: embree
dpcpp-version: intel-llvm/nightly-2023-10-26-rk
artifact-out: windows-DG2-JIT-INTERNAL-L0RTAS-build
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-windows-public.env
artifact-out: nightly-windows-DG2-MULTILEVEL-build
artifact-path: ./build/*.zip
cmd: |
cmake --preset windows-DG2-JIT-INTERNAL-L0RTAS -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --preset nightly-windows-DG2-MULTILEVEL -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=2
cmake --build build --config Release --target build

windows-DG2-JIT-INTERNAL-L0RTAS-test:
nightly-windows-DG2-MULTILEVEL-test:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main
needs: ["windows-DG2-JIT-INTERNAL-L0RTAS-build"]
needs: ["nightly-windows-DG2-MULTILEVEL-build"]
with:
runs-on: '[ "Windows", "NAS", "dg2" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-windows-internal.env
artifact-in: windows-DG2-JIT-INTERNAL-L0RTAS-build
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-windows-public.env
artifact-in: nightly-windows-DG2-MULTILEVEL-build
cmd: |
cmake --preset windows-DG2-JIT-INTERNAL-L0RTAS -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --preset nightly-windows-DG2-MULTILEVEL -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=2
cmake --build build --config Release --target test_package

################################################################################
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ kernels/config.h
kernels/hash.h
include/embree4/rtcore_config.h
build
build*
out
6 changes: 1 addition & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ OPTION(EMBREE_STACK_PROTECTOR "When enabled Embree compiles with stack protectio
IF (NOT APPLE)
OPTION(EMBREE_SYCL_SUPPORT "Enables SYCL GPU support." OFF)
ENDIF()
CMAKE_DEPENDENT_OPTION(EMBREE_SYCL_BVH_DATA_HOST_DEVICE "Enables BVH data in explicit host/device memory mode. Requires driver fix. Turned off until driver fix publicly available." OFF "EMBREE_SYCL_SUPPORT" OFF)
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)
CMAKE_DEPENDENT_OPTION(EMBREE_SYCL_GEOMETRY_CALLBACK "Enabled geometry callbacks which are disabled by default for SYCL." OFF "EMBREE_SYCL_SUPPORT" OFF)
Expand Down Expand Up @@ -194,11 +195,6 @@ IF (EMBREE_SYCL_SUPPORT)
ENDIF()
ENDIF()

CMAKE_DEPENDENT_OPTION(EMBREE_SYCL_L0_RTAS_BUILDER "Enable Level Zero RTAS builder" ON "EMBREE_SYCL_SUPPORT" OFF)
IF (EMBREE_SYCL_L0_RTAS_BUILDER)
ADD_DEFINITIONS("-DEMBREE_SYCL_L0_RTAS_BUILDER")
ENDIF()

OPTION(EMBREE_RAY_MASK "Enables ray mask support." ON)
OPTION(EMBREE_BACKFACE_CULLING "Enables backface culling.")
OPTION(EMBREE_BACKFACE_CULLING_CURVES "Enables backface culling for curve primitives." OFF)
Expand Down
2 changes: 0 additions & 2 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"EMBREE_SYCL_SUPPORT": "ON",
"EMBREE_SYCL_L0_RTAS_BUILDER" : "OFF",
"EMBREE_SYCL_AOT_DEVICES": "none",
"EMBREE_MAX_ISA": "AVX512",
"EMBREE_USE_GOOGLE_BENCHMARK": "ON",
Expand Down Expand Up @@ -83,7 +82,6 @@
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"EMBREE_SYCL_SUPPORT": "ON",
"EMBREE_SYCL_L0_RTAS_BUILDER" : "OFF",
"EMBREE_SYCL_AOT_DEVICES": "none",
"EMBREE_MAX_ISA": "AVX512"
}
Expand Down
8 changes: 8 additions & 0 deletions common/math/vec3fa_sycl.h
Original file line number Diff line number Diff line change
Expand Up @@ -614,4 +614,12 @@ namespace embree

//__forceinline Vec3ia::Vec3ia( const Vec3fx& a )
// : x((int)a.x), y((int)a.y), z((int)a.z) {}

}

#if __SYCL_COMPILER_VERSION >= 20210801
namespace sycl {
template<> struct is_device_copyable<embree::Vec3fa> : std::true_type {};
template<> struct is_device_copyable<const embree::Vec3fa> : std::true_type {};
}
#endif
Loading