Skip to content

Conversation

ayylol
Copy link
Contributor

@ayylol ayylol commented Oct 18, 2024

The capitalization of cuda and hip in Basic/interop/interop_all_backends.cpp makes the test always unsupported. This patch removes the requires line, and refactors how the test is built so that we build an executable for each backend.

@ayylol ayylol requested review from a team as code owners October 18, 2024 19:07
@ayylol ayylol requested a review from sergey-semenov October 18, 2024 19:07
@ayylol ayylol changed the title [SYCL][E2E] Fix typos in REQUIRES: lit lines [SYCL][E2E] Fix capitalization in REQUIRES: lit line Oct 21, 2024
// REQUIRES: CUDA || HIP
// RUN: %{build} %if hip %{ -DSYCL_EXT_ONEAPI_BACKEND_HIP %} %else %{ %if cuda %{ -DSYCL_EXT_ONEAPI_BACKEND_CUDA_EXPERIMENTAL %} %else %{ %if level_zero %{ -DSYCL_EXT_ONEAPI_BACKEND_L0 %} %} %} -o %t.out
// REQUIRES: cuda || hip
// RUN: %{build} %if any-device-is-hip %{ -DSYCL_EXT_ONEAPI_BACKEND_HIP %} %else %{ %if any-device-is-cuda %{ -DSYCL_EXT_ONEAPI_BACKEND_CUDA_EXPERIMENTAL %} %else %{ %if any-device-is-level_zero %{ -DSYCL_EXT_ONEAPI_BACKEND_L0 %} %} %} -o %t.out
Copy link
Contributor

@againull againull Oct 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This way we will build an executable only for hip, or only for cuda, or only for l0.
Probably this line should be split into three lines with different executable names.

@ayylol ayylol changed the title [SYCL][E2E] Fix capitalization in REQUIRES: lit line [SYCL][E2E] Re-enableBasic/interop/interop_all_backends.cpp test Oct 22, 2024
@ayylol ayylol changed the title [SYCL][E2E] Re-enableBasic/interop/interop_all_backends.cpp test [SYCL][E2E] Re-enable interop_all_backends.cpp test Oct 22, 2024
@againull againull merged commit 7e2d615 into intel:sycl Oct 25, 2024
13 checks passed
@ayylol ayylol deleted the requires-typo branch October 25, 2024 17:59
@sarnex
Copy link
Contributor

sarnex commented Oct 25, 2024

@ayylol Test is failing on HIP in postcommit unfortunately. Think you can fix it quickly? If not let's revert for now

https://github.com/intel/llvm/actions/runs/11523103039/job/32080880588

-- Testing: 2233 tests, 24 workers --
FAIL: SYCL :: Basic/interop/interop_all_backends.cpp (278 of 2233)
******************** TEST 'SYCL :: Basic/interop/interop_all_backends.cpp' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 3 has no command after substitutions
# RUN: at line 4 has no command after substitutions
# RUN: at line 5 has no command after substitutions
# RUN: at line 6
/__w/llvm/llvm/toolchain/bin//clang++  -Werror -Xsycl-target-backend=amdgcn-amd-amdhsa --offload-arch=gfx1031 -fsycl -fsycl-targets=amdgcn-amd-amdhsa  /__w/llvm/llvm/llvm/sycl/test-e2e/Basic/interop/interop_all_backends.cpp -DBUILD_FOR_HIP -o /__w/llvm/llvm/build-e2e/Basic/interop/Output/interop_all_backends.cpp.tmp-hip.out
# executed command: /__w/llvm/llvm/toolchain/bin//clang++ -Werror -Xsycl-target-backend=amdgcn-amd-amdhsa --offload-arch=gfx1031 -fsycl -fsycl-targets=amdgcn-amd-amdhsa /__w/llvm/llvm/llvm/sycl/test-e2e/Basic/interop/interop_all_backends.cpp -DBUILD_FOR_HIP -o /__w/llvm/llvm/build-e2e/Basic/interop/Output/interop_all_backends.cpp.tmp-hip.out
# .---command stderr------------
# | /__w/llvm/llvm/llvm/sycl/test-e2e/Basic/interop/interop_all_backends.cpp:23:22: error: unknown type name 'hipDevice_t'
# |    23 | using nativeDevice = hipDevice_t;
# |       |                      ^
# | /__w/llvm/llvm/llvm/sycl/test-e2e/Basic/interop/interop_all_backends.cpp:24:21: error: unknown type name 'hipStream_t'; did you mean 'ihipStream_t'?
# |    24 | using nativeQueue = hipStream_t;
# |       |                     ^~~~~~~~~~~
# |       |                     ihipStream_t
# | /__w/llvm/llvm/toolchain/bin/../include/sycl/detail/backend_traits_hip.hpp:26:16: note: 'ihipStream_t' declared here
# |    26 | typedef struct ihipStream_t *HIPstream;
# |       |                ^
# | /__w/llvm/llvm/llvm/sycl/test-e2e/Basic/interop/interop_all_backends.cpp:25:21: error: unknown type name 'hipEvent_t'; did you mean 'ihipEvent_t'?
# |    25 | using nativeEvent = hipEvent_t;
# |       |                     ^~~~~~~~~~
# |       |                     ihipEvent_t
# | /__w/llvm/llvm/toolchain/bin/../include/sycl/detail/backend_traits_hip.hpp:27:16: note: 'ihipEvent_t' declared here
# |    27 | typedef struct ihipEvent_t *HIPevent;
# |       |                ^
# | /__w/llvm/llvm/llvm/sycl/test-e2e/Basic/interop/interop_all_backends.cpp:45:22: error: use of undeclared identifier 'nativeDevice'
# |    45 |                      nativeDevice>));
# |       |                      ^
# | 4 errors generated.
# `-----------------------------
# error: command failed with exit status: 1

@sarnex
Copy link
Contributor

sarnex commented Oct 25, 2024

@ayylol Failing on DG2 also

/llvm/llvm/llvm/sycl/test-e2e/lit.cfg.py:664: note: Found pre-installed AOT device compiler ocloc
lit.py: /__w/llvm/llvm/llvm/sycl/test-e2e/lit.cfg.py:664: note: Found pre-installed AOT device compiler opencl-aot
lit.py: /__w/llvm/llvm/llvm/sycl/test-e2e/lit.cfg.py:756: note: Aspects for level_zero:gpu: gpu, usm_shared_allocations, ext_intel_gpu_subslices_per_slice, queue_profiling, online_linker, atomic64, ext_intel_matrix, ext_intel_pci_address, ext_intel_gpu_eu_simd_width, usm_host_allocations, ext_oneapi_bindless_images_2d_usm, fp16, ext_intel_gpu_slices, ext_oneapi_virtual_functions, ext_oneapi_bindless_images_1d_usm, ext_intel_device_id, ext_intel_legacy_image, usm_device_allocations, ext_oneapi_opportunistic_group, ext_intel_esimd, ext_oneapi_virtual_mem, ext_intel_gpu_eu_count, ext_oneapi_fixed_size_group, ext_intel_memory_bus_width, ext_oneapi_bindless_images, ext_oneapi_private_alloca, ext_intel_gpu_eu_count_per_subslice, ext_oneapi_queue_profiling_tag, ext_oneapi_ballot_group, online_compiler, ext_oneapi_limited_graph, ext_intel_free_memory, ext_intel_memory_clock_rate, ext_intel_gpu_hw_threads_per_eu, ext_intel_device_info_uuid, ext_oneapi_tangle_group
lit.py: /__w/llvm/llvm/llvm/sycl/test-e2e/lit.cfg.py:768: note: SG sizes for level_zero:gpu: 8, 32, 16
lit.py: /__w/llvm/llvm/llvm/sycl/test-e2e/lit.cfg.py:777: note: Architectures for level_zero:gpu: intel_gpu_acm_g10
-- Testing: 2233 tests, 24 workers --
FAIL: SYCL :: Basic/interop/interop_all_backends.cpp (276 of 2233)
******************** TEST 'SYCL :: Basic/interop/interop_all_backends.cpp' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 3 has no command after substitutions
# RUN: at line 4
/__w/llvm/llvm/toolchain/bin//clang++  -Werror  -fsycl -fsycl-targets=spir64  /__w/llvm/llvm/llvm/sycl/test-e2e/Basic/interop/interop_all_backends.cpp -DBUILD_FOR_L0 -o /__w/llvm/llvm/build-e2e/Basic/interop/Output/interop_all_backends.cpp.tmp-l0.out
# executed command: /__w/llvm/llvm/toolchain/bin//clang++ -Werror -fsycl -fsycl-targets=spir64 /__w/llvm/llvm/llvm/sycl/test-e2e/Basic/interop/interop_all_backends.cpp -DBUILD_FOR_L0 -o /__w/llvm/llvm/build-e2e/Basic/interop/Output/interop_all_backends.cpp.tmp-l0.out
# .---command stderr------------
# | /__w/llvm/llvm/llvm/sycl/test-e2e/Basic/interop/interop_all_backends.cpp:65:23: error: no matching function for call to 'make_queue'
# |    65 |   auto InteropQueue = make_queue<BACKEND>(NativeQueue, Context);
# |       |                       ^~~~~~~~~~~~~~~~~~~
# | /__w/llvm/llvm/toolchain/bin/../include/sycl/backend.hpp:348:1: note: candidate function template not viable: no known conversion from 'backend_traits<BACKEND>::return_type<queue>' (aka 'variant<_ze_command_queue_handle_t *, _ze_command_list_handle_t *>') to 'const typename backend_traits<(backend)'\x02'>::template input_type<queue>' (aka 'const sycl::detail::BackendInput<sycl::backend::ext_oneapi_level_zero, sycl::queue>::type') for 1st argument
# |   348 | make_queue(const typename backend_traits<Backend>::template input_type<queue>
# |       | ^          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |   349 |                &BackendObject,
# |       |                ~~~~~~~~~~~~~~
# | /__w/llvm/llvm/llvm/sycl/test-e2e/Basic/interop/interop_all_backends.cpp:78:24: error: no matching function for call to 'make_event'
# |    78 |   event InteropEvent = make_event<BACKEND>(NativeEvent, Context);
# |       |                        ^~~~~~~~~~~~~~~~~~~
# | /__w/llvm/llvm/toolchain/bin/../include/sycl/backend.hpp:361:1: note: candidate function template not viable: cannot convert argument of incomplete type 'backend_traits<BACKEND>::return_type<event>' (aka '_ze_event_handle_t *') to 'const typename backend_traits<(backend)'\x02'>::template input_type<event>' (aka 'const sycl::detail::BackendInput<sycl::backend::ext_oneapi_level_zero, sycl::event>::type') for 1st argument
# |   361 | make_event(const typename backend_traits<Backend>::template input_type<event>
# |       | ^          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |   362 |                &BackendObject,
# |       |                ~~~~~~~~~~~~~~
# | /__w/llvm/llvm/toolchain/bin/../include/sycl/backend.hpp:371:25: note: candidate function template not viable: requires 3 arguments, but 2 were provided
# |   371 |                  event> make_event(const typename backend_traits<Backend>::
# |       |                         ^          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |   372 |                                        template input_type<event>
# |       |                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~
# |   373 |                                            &BackendObject,
# |       |                                            ~~~~~~~~~~~~~~~
# |   374 |                                    const context &TargetContext,
# |       |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |   375 |                                    bool KeepOwnership) {
# |       |                                    ~~~~~~~~~~~~~~~~~~
# | 2 errors generated.
# `-----------------------------
# error: command failed with exit status: 1

@ayylol
Copy link
Contributor Author

ayylol commented Oct 25, 2024

@ayylol Test is failing on HIP in postcommit unfortunately. Think you can fix it quickly? If not let's revert for now

https://github.com/intel/llvm/actions/runs/11523103039/job/32080880588

-- Testing: 2233 tests, 24 workers --
FAIL: SYCL :: Basic/interop/interop_all_backends.cpp (278 of 2233)
******************** TEST 'SYCL :: Basic/interop/interop_all_backends.cpp' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 3 has no command after substitutions
# RUN: at line 4 has no command after substitutions
# RUN: at line 5 has no command after substitutions
# RUN: at line 6
/__w/llvm/llvm/toolchain/bin//clang++  -Werror -Xsycl-target-backend=amdgcn-amd-amdhsa --offload-arch=gfx1031 -fsycl -fsycl-targets=amdgcn-amd-amdhsa  /__w/llvm/llvm/llvm/sycl/test-e2e/Basic/interop/interop_all_backends.cpp -DBUILD_FOR_HIP -o /__w/llvm/llvm/build-e2e/Basic/interop/Output/interop_all_backends.cpp.tmp-hip.out
# executed command: /__w/llvm/llvm/toolchain/bin//clang++ -Werror -Xsycl-target-backend=amdgcn-amd-amdhsa --offload-arch=gfx1031 -fsycl -fsycl-targets=amdgcn-amd-amdhsa /__w/llvm/llvm/llvm/sycl/test-e2e/Basic/interop/interop_all_backends.cpp -DBUILD_FOR_HIP -o /__w/llvm/llvm/build-e2e/Basic/interop/Output/interop_all_backends.cpp.tmp-hip.out
# .---command stderr------------
# | /__w/llvm/llvm/llvm/sycl/test-e2e/Basic/interop/interop_all_backends.cpp:23:22: error: unknown type name 'hipDevice_t'
# |    23 | using nativeDevice = hipDevice_t;
# |       |                      ^
# | /__w/llvm/llvm/llvm/sycl/test-e2e/Basic/interop/interop_all_backends.cpp:24:21: error: unknown type name 'hipStream_t'; did you mean 'ihipStream_t'?
# |    24 | using nativeQueue = hipStream_t;
# |       |                     ^~~~~~~~~~~
# |       |                     ihipStream_t
# | /__w/llvm/llvm/toolchain/bin/../include/sycl/detail/backend_traits_hip.hpp:26:16: note: 'ihipStream_t' declared here
# |    26 | typedef struct ihipStream_t *HIPstream;
# |       |                ^
# | /__w/llvm/llvm/llvm/sycl/test-e2e/Basic/interop/interop_all_backends.cpp:25:21: error: unknown type name 'hipEvent_t'; did you mean 'ihipEvent_t'?
# |    25 | using nativeEvent = hipEvent_t;
# |       |                     ^~~~~~~~~~
# |       |                     ihipEvent_t
# | /__w/llvm/llvm/toolchain/bin/../include/sycl/detail/backend_traits_hip.hpp:27:16: note: 'ihipEvent_t' declared here
# |    27 | typedef struct ihipEvent_t *HIPevent;
# |       |                ^
# | /__w/llvm/llvm/llvm/sycl/test-e2e/Basic/interop/interop_all_backends.cpp:45:22: error: use of undeclared identifier 'nativeDevice'
# |    45 |                      nativeDevice>));
# |       |                      ^
# | 4 errors generated.
# `-----------------------------
# error: command failed with exit status: 1

I'll open a pr marking it as XFAIL: *

@sarnex
Copy link
Contributor

sarnex commented Oct 25, 2024

it's passing on some devices, so if we're doing XFAIL it should be gpu-intel-dg2 || hip_amd i think

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants