diff --git a/.github/workflows/continuous.yml b/.github/workflows/continuous.yml index a97992a766..58fb48e237 100644 --- a/.github/workflows/continuous.yml +++ b/.github/workflows/continuous.yml @@ -50,7 +50,7 @@ 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-PUBLIC-build: + linux-GPU-JIT-build: secrets: inherit uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main with: @@ -58,26 +58,39 @@ jobs: runs-on: '[ "Linux", "docker", "build" ]' project: embree env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env - artifact-out: linux-DG2-JIT-PUBLIC-build + artifact-out: linux-GPU-JIT-build artifact-path: ./build/*.tar.gz cmd: | - module load cmake/3.25.3 cmake --preset linux-DG2-JIT-PUBLIC -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3 cmake --build build --config Release --target build linux-DG2-JIT-PUBLIC-test: secrets: inherit uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main - needs: ["linux-DG2-JIT-PUBLIC-build"] + needs: ["linux-GPU-JIT-build"] with: image: embree/ubuntu:24.04 options: --device=/dev/dri:/dev/dri runs-on: '[ "Linux", "docker", "dg2" ]' project: embree env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-ubuntu24-public.env - artifact-in: linux-DG2-JIT-PUBLIC-build + artifact-in: linux-GPU-JIT-build + cmd: | + cmake --preset linux-DG2-JIT-PUBLIC -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3 + cmake --build build --config Release --target test_package + + linux-PVC-JIT-PUBLIC-test: + secrets: inherit + uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main + needs: ["linux-GPU-JIT-build"] + with: + image: embree/ubuntu:24.04 + options: --device=/dev/dri:/dev/dri + runs-on: '[ "Linux", "docker", "pvc" ]' + project: embree + env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-ubuntu24-public.env + artifact-in: linux-GPU-JIT-build cmd: | - module load cmake/3.25.3 cmake --preset linux-DG2-JIT-PUBLIC -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3 cmake --build build --config Release --target test_package @@ -92,7 +105,6 @@ jobs: artifact-out: linux-DG2-JIT-PUBLIC-ICX-build artifact-path: ./build/*.tar.gz cmd: | - module load cmake/3.25.3 cmake --preset linux-DG2-JIT-PUBLIC-ICX -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3 cmake --build build --config Release --target build @@ -109,7 +121,6 @@ jobs: dpcpp-version: intel/2025.2 artifact-in: linux-DG2-JIT-PUBLIC-ICX-build cmd: | - module load cmake/3.25.3 cmake --preset linux-DG2-JIT-PUBLIC-ICX -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3 cmake --build build --config Release --target test_package @@ -125,115 +136,9 @@ jobs: artifact-out: linux-DG2-JIT-PUBLIC-debug-build artifact-path: ./build/*.tar.gz cmd: | - module load cmake/3.25.3 cmake --preset linux-DG2-JIT-PUBLIC-debug -DCMAKE_BUILD_TYPE=Debug -DEMBREE_TESTING_INTENSITY=3 cmake --build build --config Debug --target build - - - ########################################## - ### Linux PVC TODO: Reenable after patch - ########################################## - - #linux-PVC-JIT-INTERNAL-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 - # env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env - # artifact-out: linux-PVC-JIT-INTERNAL-build - # artifact-path: ./build/*.tar.gz - # cmd: | - # module load cmake/3.25.3 - # cmake --preset linux-PVC-JIT-INTERNAL-SYCL-RC -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3 -DSKIP_TEST_PVC=ON - # cmake --build build --config Release --target build - - ## TODO: move to nightly - #linux-PVC-JIT-INTERNAL-test-1T: - # secrets: inherit - # uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main - # needs: ["linux-PVC-JIT-INTERNAL-build"] - # with: - # image: embree/ubuntu:22.04 - # options: --device=/dev/dri:/dev/dri - # runs-on: '[ "Linux", "docker", "pvc" ]' - # project: embree - # env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-ubuntu22-internal.env - # artifact-in: linux-PVC-JIT-INTERNAL-build - # cmd: | - # export NEOReadDebugKeys=1 - # export UseKmdMigration=0 - # export EnableImplicitScaling=0 - # export ZE_FLAT_DEVICE_HIERARCHY=COMPOSITE - # module load cmake/3.25.3 - # cmake --preset linux-PVC-JIT-INTERNAL-SYCL-RC -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3 -DSKIP_TEST_PVC=ON - # cmake --build build --config Release --target test_package - - #linux-PVC-JIT-INTERNAL-test-2T: - # secrets: inherit - # uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main - # needs: ["linux-PVC-JIT-INTERNAL-build"] - # with: - # image: embree/ubuntu:22.04 - # options: --device=/dev/dri:/dev/dri - # runs-on: '[ "Linux", "docker", "pvc" ]' - # project: embree - # env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-ubuntu22-internal.env - # artifact-in: linux-PVC-JIT-INTERNAL-build - # cmd: | - # export NEOReadDebugKeys=1 - # export UseKmdMigration=0 - # export ZE_FLAT_DEVICE_HIERARCHY=COMPOSITE - # module load cmake/3.25.3 - # cmake --preset linux-PVC-JIT-INTERNAL-SYCL-RC -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3 -DSKIP_TEST_PVC=ON - # cmake --build build --config Release --target test_package - - #linux-PVC-JIT-INTERNAL-test-flat: - # secrets: inherit - # uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main - # needs: ["linux-PVC-JIT-INTERNAL-build"] - # with: - # image: embree/ubuntu:22.04 - # options: --device=/dev/dri:/dev/dri - # runs-on: '[ "Linux", "docker", "pvc" ]' - # project: embree - # env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-ubuntu22-internal.env - # artifact-in: linux-PVC-JIT-INTERNAL-build - # cmd: | - # module load cmake/3.25.3 - # cmake --preset linux-PVC-JIT-INTERNAL-SYCL-RC -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3 -DSKIP_TEST_PVC=ON - # cmake --build build --config Release --target test_package - - - # linux-PVC-JIT-PUBLIC: - # 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" ]' - # artifact-out: linux-PVC-JIT-PUBLIC - # artifact-path: ./build .ctest_conf - # cmd: | - # scripts/test.py configure platform:x64 compiler:dpcpp ispc:ispc1.16.1 isa:SSE2 build:RelWithAssert EMBREE_SYCL_SUPPORT:ON sycl:none tasking:TBB intensity:4 - # scripts/test.py build --debug - # scripts/test.py build - # - # linux-PVC-JIT-PUBLIC-test: - # secrets: inherit - # uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main - # needs: ["linux-PVC-JIT-PUBLIC"] - # with: - # image: embree/ubuntu:22.04 - # options: --device=/dev/dri:/dev/dri - # runs-on: '[ "Linux", "docker", "pvc" ]' - # artifact-in: linux-PVC-JIT-PUBLIC - # cmd: | - # scripts/test.py test --debug - # scripts/test.py test - - ######################################## # Windows DG2 ######################################## diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 22050245c6..71e7cc5c75 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -96,96 +96,41 @@ jobs: cmake --preset nightly-linux-PVC-JIT -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=4 cmake --build build --config Release --target build - # nightly-linux-PVC-JIT-test: - # secrets: inherit - # uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main - # needs: ["nightly-linux-PVC-JIT-build"] - # with: - # image: embree/ubuntu:24.04 - # options: --device=/dev/dri:/dev/dri - # runs-on: '[ "Linux", "docker", "pvc" ]' - # project: embree - # env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-ubuntu24-public.env - # artifact-in: nightly-linux-PVC-JIT-build - # cmd: | - # export NEOReadDebugKeys=1 - # export UseKmdMigration=0 - # export ZE_FLAT_DEVICE_HIERARCHY=COMPOSITE - # cmake --preset nightly-linux-PVC-JIT -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=4 - # cmake --build build --config Release --target test_package - - #linux-PVC-JIT-INTERNAL-SYCL-RC-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-PVC-JIT-INTERNAL-SYCL-RC-build - # artifact-path: ./build/*.tar.gz - # cmd: | - # module load cmake/3.25.3 - # cmake --preset linux-PVC-JIT-INTERNAL-SYCL-RC -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3 - # cmake --build build --config Release --target build - - #linux-PVC-JIT-INTERNAL-SYCL-RC-test-1T: - # secrets: inherit - # uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main - # needs: ["linux-PVC-JIT-INTERNAL-SYCL-RC-build"] - # with: - # image: embree/ubuntu:22.04 - # options: --device=/dev/dri:/dev/dri - # runs-on: '[ "Linux", "docker", "pvc" ]' - # project: embree - # env-from-files: ./.github/workflows/gfx-ubuntu22-internal.env - # dpcpp-version: intel-llvm/sycl-rel_5_2_0-rk - # artifact-in: linux-PVC-JIT-INTERNAL-SYCL-RC-build - # cmd: | - # export NEOReadDebugKeys=1 - # export UseKmdMigration=0 - # export ZE_FLAT_DEVICE_HIERARCHY=COMPOSITE - # export EnableImplicitScaling=0 - # module load cmake/3.25.3 - # cmake --preset linux-PVC-JIT-INTERNAL-SYCL-RC -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3 - # cmake --build build --config Release --target test_package - - #linux-PVC-JIT-INTERNAL-SYCL-RC-test-2T: - # secrets: inherit - # uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main - # needs: ["linux-PVC-JIT-INTERNAL-SYCL-RC-build"] - # with: - # image: embree/ubuntu:22.04 - # options: --device=/dev/dri:/dev/dri - # runs-on: '[ "Linux", "docker", "pvc" ]' - # project: embree - # env-from-files: ./.github/workflows/gfx-ubuntu22-internal.env - # dpcpp-version: intel-llvm/sycl-rel_5_2_0-rk - # artifact-in: linux-PVC-JIT-INTERNAL-SYCL-RC-build - # cmd: | - # module load cmake/3.25.3 - # export NEOReadDebugKeys=1 - # export UseKmdMigration=0 - # export ZE_FLAT_DEVICE_HIERARCHY=COMPOSITE - # cmake --preset linux-PVC-JIT-INTERNAL-SYCL-RC -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3 - # cmake --build build --config Release --target test_package + nightly-linux-PVC-JIT-test-1T: + secrets: inherit + uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main + needs: ["nightly-linux-PVC-JIT-build"] + with: + image: embree/ubuntu:24.04 + options: --device=/dev/dri:/dev/dri + runs-on: '[ "Linux", "docker", "pvc" ]' + project: embree + env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-ubuntu24-public.env + artifact-in: nightly-linux-PVC-JIT-build + cmd: | + export NEOReadDebugKeys=1 + export EnableImplicitScaling=0 + export ZE_FLAT_DEVICE_HIERARCHY=COMPOSITE + cmake --preset nightly-linux-PVC-JIT -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=4 + cmake --build build --config Release --target test_package - #linux-PVC-JIT-INTERNAL-SYCL-RC-test-flat: - # secrets: inherit - # uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main - # needs: ["linux-PVC-JIT-INTERNAL-SYCL-RC-build"] - # with: - # image: embree/ubuntu:22.04 - # options: --device=/dev/dri:/dev/dri - # runs-on: '[ "Linux", "docker", "pvc" ]' - # project: embree - # env-from-files: ./.github/workflows/gfx-ubuntu22-internal.env - # dpcpp-version: intel-llvm/sycl-rel_5_2_0-rk - # artifact-in: linux-PVC-JIT-INTERNAL-SYCL-RC-build - # cmd: | - # module load cmake/3.25.3 - # cmake --preset linux-PVC-JIT-INTERNAL-SYCL-RC -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3 - # cmake --build build --config Release --target test_package + nightly-linux-PVC-JIT-test-2T: + secrets: inherit + uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main + needs: ["nightly-linux-PVC-JIT-build"] + with: + image: embree/ubuntu:24.04 + options: --device=/dev/dri:/dev/dri + runs-on: '[ "Linux", "docker", "pvc" ]' + project: embree + env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-ubuntu24-public.env + artifact-in: nightly-linux-PVC-JIT-build + cmd: | + export NEOReadDebugKeys=1 + export EnableImplicitScaling=1 + export ZE_FLAT_DEVICE_HIERARCHY=COMPOSITE + cmake --preset nightly-linux-PVC-JIT -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=4 + cmake --build build --config Release --target test_package # linux-ATSM-JIT-SYCL-RC-build: # secrets: inherit diff --git a/kernels/sycl/rthwif_embree_builder.cpp b/kernels/sycl/rthwif_embree_builder.cpp index bee6b00387..e570adc8bc 100644 --- a/kernels/sycl/rthwif_embree_builder.cpp +++ b/kernels/sycl/rthwif_embree_builder.cpp @@ -150,6 +150,28 @@ namespace embree return sycl_device.get_info(); } + const bool isPVC(const ze_device_handle_t hDevice) + { + ze_device_properties_t device_props{ ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES }; + ze_result_t status = ZeWrapper::zeDeviceGetProperties(hDevice, &device_props); + if (status != ZE_RESULT_SUCCESS) + throw_RTCError(RTC_ERROR_UNKNOWN, "zeDeviceGetProperties properties failed"); + + /* check for Intel vendor */ + const uint32_t vendor_id = device_props.vendorId; + const uint32_t device_id = device_props.deviceId; + if (vendor_id != 0x8086) return false; + + /* PVC */ + const bool pvc = + (0x0BD5 <= device_id && device_id <= 0x0BDB) || + (device_id == 0x0B69) || + (device_id == 0x0B6E) || + (device_id == 0x0BD4); + + return pvc; + } + void* rthwifAllocAccelBuffer(Device* embree_device, size_t bytes, sycl::device device, sycl::context context, sycl::usm::alloc alloc_type) { ze_context_handle_t hContext = sycl::get_native(context); @@ -191,6 +213,13 @@ namespace embree if (embree_device) embree_device->memoryMonitor(bytes,false); + if (alloc_type == sycl::usm::alloc::device && isPVC(hDevice)) { + // This is Workaround for PVC. + // There is existing bug on PVC which prevents us from allocating RTAS memory on device + // so we fallback to shared allocation for device USM allocations. + alloc_type = sycl::usm::alloc::shared; + } + ze_result_t result; switch (alloc_type) { case sycl::usm::alloc::host: diff --git a/kernels/sycl/rthwif_embree_builder.h b/kernels/sycl/rthwif_embree_builder.h index 06236f536b..e9f1a7225b 100644 --- a/kernels/sycl/rthwif_embree_builder.h +++ b/kernels/sycl/rthwif_embree_builder.h @@ -23,6 +23,8 @@ namespace embree int rthwifIsSYCLDeviceSupported(const sycl::device& sycl_device); + const bool isPVC(const ze_device_handle_t hDevice); + /*! allocator that performs BVH memory allocations */ template struct AccelAllocator