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

Compilation of DeviceLib/device-windows.cpp fails on windows, cpu #16507

Open
lbushi25 opened this issue Jan 2, 2025 · 2 comments
Open

Compilation of DeviceLib/device-windows.cpp fails on windows, cpu #16507

lbushi25 opened this issue Jan 2, 2025 · 2 comments
Labels
bug Something isn't working confirmed Windows

Comments

@lbushi25
Copy link
Contributor

lbushi25 commented Jan 2, 2025

Describe the bug

The E2E test SYCL :: DeviceLib/assert-windows.cpp is failing to compile on windows, cpu.
Upon resolution, please remove XFAIL from test source.

To reproduce

The following snippet is taken from the job with the name "SYCL Pre Commit on Linux / build_e2e_tests / Build e2e tests (pull_request)".

FAIL: SYCL :: DeviceLib/assert-windows.cpp (453 of 2240)
******************** TEST 'SYCL :: DeviceLib/assert-windows.cpp' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 3
/__w/llvm/llvm/toolchain/bin//clang++  -Werror  -fsycl -fsycl-targets=spir64  /__w/llvm/llvm/llvm/sycl/test-e2e/DeviceLib/assert-windows.cpp -o /__w/llvm/llvm/build-e2e/DeviceLib/Output/assert-windows.cpp.tmp.out
# executed command: /__w/llvm/llvm/toolchain/bin//clang++ -Werror -fsycl -fsycl-targets=spir64 /__w/llvm/llvm/llvm/sycl/test-e2e/DeviceLib/assert-windows.cpp -o /__w/llvm/llvm/build-e2e/DeviceLib/Output/assert-windows.cpp.tmp.out
# .---command stderr------------
# | /__w/llvm/llvm/llvm/sycl/test-e2e/DeviceLib/assert-windows.cpp:62:9: error: SYCL kernel cannot call an undefined function without SYCL_EXTERNAL attribute
# |    62 |         assert(accessorC[wiID] == 0 && "Invalid value");
# |       |         ^
# | /usr/include/assert.h:105:9: note: expanded from macro 'assert'
# |   105 |       : __assert_fail (#expr, __ASSERT_FILE, __ASSERT_LINE,             \
# |       |         ^
# | /usr/include/assert.h:69:13: note: '__assert_fail' declared here
# |    69 | extern void __assert_fail (const char *__assertion, const char *__file,
# |       |             ^
# | /__w/llvm/llvm/llvm/sycl/test-e2e/DeviceLib/assert-windows.cpp:59:53: note: called by 'operator()'
# |    59 |     cgh.parallel_for<class SimpleVaddT>(numOfItems, [=](sycl::id<1> wiID) {
# |       |                                                     ^
# | 1 error generated.

Environment

  • OS: Windows
  • Target device and vendor: OpenCL CPU
  • DPC++ version: f0afc91
  • Dependencies version:
- 2025-01-02T18:58:12.4779340Z �[36;1msycl-ls --verbose�[0m
2025-01-02T18:58:12.4779656Z shell: sh -e {0}
2025-01-02T18:58:12.4779879Z env:
2025-01-02T18:58:12.4780124Z   CMAKE_PREFIX_PATH: /runtimes/oneapi-tbb/env/..
2025-01-02T18:58:12.4780472Z   CPATH: /runtimes/oneapi-tbb/env/../include
2025-01-02T18:58:12.4780955Z   LD_LIBRARY_PATH: /__w/llvm/llvm/toolchain/lib/:/runtimes/oneapi-tbb/env/../lib/intel64/gcc4.8
2025-01-02T18:58:12.4781495Z   LIBRARY_PATH: /runtimes/oneapi-tbb/env/../lib/intel64/gcc4.8
2025-01-02T18:58:12.4781909Z   PKG_CONFIG_PATH: /runtimes/oneapi-tbb/env/../lib/pkgconfig
2025-01-02T18:58:12.4782266Z   TBBROOT: /runtimes/oneapi-tbb/env/..
2025-01-02T18:58:12.4782729Z   PATH: /__w/llvm/llvm/toolchain/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
2025-01-02T18:58:12.4783179Z ##[endgroup]
2025-01-02T18:58:12.6027847Z [opencl:cpu][opencl:0] Intel(R) OpenCL, Intel(R) Xeon(R) Platinum 8468V OpenCL 3.0 (Build 0) [2024.18.10.0.08_160000]
2025-01-02T18:58:12.6028728Z [opencl:fpga][opencl:1] Intel(R) FPGA Emulation Platform for OpenCL(TM), Intel(R) FPGA Emulation Device OpenCL 1.2  [2024.18.10.0.08_160000]
2025-01-02T18:58:12.6029417Z [native_cpu:cpu][native_cpu:0] SYCL_NATIVE_CPU, SYCL Native CPU 0.1 [0.0.0]
2025-01-02T18:58:12.6029727Z 
2025-01-02T18:58:12.6029828Z Platforms: 3
2025-01-02T18:58:12.6030055Z Platform [#1]:
2025-01-02T18:58:12.6030289Z     Version  : OpenCL 3.0 LINUX
2025-01-02T18:58:12.6030590Z     Name     : Intel(R) OpenCL
2025-01-02T18:58:12.6030888Z     Vendor   : Intel(R) Corporation
2025-01-02T18:58:12.6031167Z     Devices  : 1
2025-01-02T18:58:12.6031397Z         Device [#0]:
2025-01-02T18:58:12.6031638Z         Type              : cpu
2025-01-02T18:58:12.6031910Z         Version           : OpenCL 3.0 (Build 0)
2025-01-02T18:58:12.6032251Z         Name              : Intel(R) Xeon(R) Platinum 8468V
2025-01-02T18:58:12.6032586Z         Vendor            : Intel(R) Corporation
2025-01-02T18:58:12.6032912Z         Driver            : 2024.18.10.0.08_160000
2025-01-02T18:58:12.6033213Z         DeviceID          : 526072
2025-01-02T18:58:12.6530918Z         Num SubDevices    : 2
2025-01-02T18:58:12.6531220Z         Num SubSubDevices : 0
2025-01-02T18:58:12.6533375Z         Aspects           : cpu fp16 fp64 online_compiler online_linker queue_profiling usm_device_allocations usm_host_allocations usm_shared_allocations usm_system_allocations ext_intel_gpu_slices ext_intel_gpu_subslices_per_slice ext_intel_gpu_eu_count_per_subslice usm_atomic_host_allocations usm_atomic_shared_allocations atomic64 ext_oneapi_srgb ext_oneapi_native_assert ext_intel_gpu_hw_threads_per_eu ext_oneapi_cuda_async_barrier ext_intel_device_id ext_intel_legacy_image ext_oneapi_ballot_group ext_oneapi_fixed_size_group ext_oneapi_opportunistic_group ext_oneapi_tangle_group ext_intel_matrix ext_oneapi_private_alloca ext_oneapi_virtual_functions
2025-01-02T18:58:12.6541497Z         info::device::sub_group_sizes: 4 8 16 32 64
2025-01-02T18:58:12.6541852Z         Architecture: intel_cpu_spr
2025-01-02T18:58:12.6542166Z Platform [#2]:
2025-01-02T18:58:12.6542493Z     Version  : OpenCL 1.2 Intel(R) FPGA SDK for OpenCL(TM), Version 20.3
2025-01-02T18:58:12.6542934Z     Name     : Intel(R) FPGA Emulation Platform for OpenCL(TM)
2025-01-02T18:58:12.6543287Z     Vendor   : Intel(R) Corporation
2025-01-02T18:58:12.6543552Z     Devices  : 1
2025-01-02T18:58:12.6543776Z         Device [#1]:
2025-01-02T18:58:12.6544024Z         Type              : fpga
2025-01-02T18:58:12.6544294Z         Version           : OpenCL 1.2 
2025-01-02T18:58:12.6544617Z         Name              : Intel(R) FPGA Emulation Device
2025-01-02T18:58:12.6544946Z         Vendor            : Intel(R) Corporation
2025-01-02T18:58:12.6545252Z         Driver            : 2024.18.10.0.08_160000
2025-01-02T18:58:12.6545640Z         DeviceID          : 526072
2025-01-02T18:58:12.6995959Z         Num SubDevices    : 2
2025-01-02T18:58:12.6996298Z         Num SubSubDevices : 0
2025-01-02T18:58:12.6998842Z         Aspects           : accelerator fp64 online_compiler online_linker queue_profiling usm_device_allocations usm_host_allocations usm_shared_allocations ext_intel_gpu_slices ext_intel_gpu_subslices_per_slice ext_intel_gpu_eu_count_per_subslice usm_atomic_host_allocations usm_atomic_shared_allocations ext_oneapi_srgb ext_intel_gpu_hw_threads_per_eu ext_oneapi_cuda_async_barrier ext_intel_device_id ext_oneapi_ballot_group ext_oneapi_fixed_size_group ext_oneapi_opportunistic_group ext_oneapi_tangle_group ext_intel_fpga_task_sequence ext_oneapi_private_alloca
2025-01-02T18:58:12.7000756Z         info::device::sub_group_sizes: 4 8 16 32 64
2025-01-02T18:58:12.7001099Z         Architecture: unknown
2025-01-02T18:58:12.7001366Z Platform [#3]:
2025-01-02T18:58:12.7001586Z     Version  : 0.1
2025-01-02T18:58:12.7001829Z     Name     : SYCL_NATIVE_CPU
2025-01-02T18:58:12.7002077Z     Vendor   : tbd
2025-01-02T18:58:12.7002299Z     Devices  : 1
2025-01-02T18:58:12.7002517Z         Device [#0]:
2025-01-02T18:58:12.7002754Z         Type              : cpu
2025-01-02T18:58:12.7003019Z         Version           : 0.1
2025-01-02T18:58:12.7003285Z         Name              : SYCL Native CPU
2025-01-02T18:58:12.7003588Z         Vendor            : Intel(R) Corporation
2025-01-02T18:58:12.7003891Z         Driver            : 0.0.0
2025-01-02T18:58:12.7004163Z         DeviceID          : UNKNOWN
2025-01-02T18:58:12.7004426Z         Num SubDevices    : 0
2025-01-02T18:58:12.7004689Z         Num SubSubDevices : 0
2025-01-02T18:58:12.7005554Z         Aspects           : cpu fp16 fp64 online_compiler online_linker queue_profiling usm_device_allocations usm_host_allocations usm_shared_allocations usm_system_allocations usm_atomic_host_allocations usm_atomic_shared_allocations atomic64
2025-01-02T18:58:12.7006439Z         info::device::sub_group_sizes: 1
2025-01-02T18:58:12.7006731Z         Architecture: unknown
2025-01-02T18:58:12.7007216Z default_selector()      : cpu, Intel(R) OpenCL, Intel(R) Xeon(R) Platinum 8468V OpenCL 3.0 (Build 0) [2024.18.10.0.08_160000]
2025-01-02T18:58:12.7008044Z accelerator_selector()  : fpga, Intel(R) FPGA Emulation Platform for OpenCL(TM), Intel(R) FPGA Emulation Device OpenCL 1.2  [2024.18.10.0.08_160000]
2025-01-02T18:58:12.7008812Z cpu_selector()          : cpu, Intel(R) OpenCL, Intel(R) Xeon(R) Platinum 8468V OpenCL 3.0 (Build 0) [2024.18.10.0.08_160000]
2025-01-02T18:58:12.7009370Z gpu_selector()          : No device of requested type available.
2025-01-02T18:58:12.7009944Z custom_selector(gpu)    : No device of requested type available.
2025-01-02T18:58:12.7010502Z custom_selector(cpu)    : cpu, Intel(R) OpenCL, Intel(R) Xeon(R) Platinum 8468V OpenCL 3.0 (Build 0) [2024.18.10.0.08_160000]
2025-01-02T18:58:12.7011269Z custom_selector(acc)    : fpga, Intel(R) FPGA Emulation Platform for OpenCL(TM), Intel(R) FPGA Emulation Device OpenCL 1.2  [2024.18.10.0.08_160000]

Additional context

No response

@lbushi25 lbushi25 added bug Something isn't working confirmed Windows labels Jan 2, 2025
@lbushi25 lbushi25 changed the title Compilation of DeviceLib/device-windows.cpp failing to compile on windows, cpu Compilation of DeviceLib/device-windows.cpp fails on windows, cpu Jan 2, 2025
@sarnex
Copy link
Contributor

sarnex commented Jan 2, 2025

Hey @ayylol , it looks like this is related to split e2e testing, the test has

// REQUIRES: cpu,windows

but somehow it is compiling in the Linux build E2E tests job. Probably it's fine to ignore most stuff in the build job like GPU, but we probably should at least honor the OS, since the problem here is this test doesn't compile on Linux for whatever reason

@lbushi25
Copy link
Contributor Author

lbushi25 commented Jan 2, 2025

Hey @ayylol , it looks like this is related to split e2e testing, the test has

// REQUIRES: cpu,windows

but somehow it is compiling in the Linux build E2E tests job. Probably it's fine to ignore most stuff in the build job like GPU, but we probably should at least honor the OS, since the problem here is this test doesn't compile on Linux for whatever reason

This test uses the SYCL assert headers which actually have specialized versions for windows, that could have something to do with it.
Nevertheless, it makes sense to fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working confirmed Windows
Projects
None yet
Development

No branches or pull requests

2 participants