-
Notifications
You must be signed in to change notification settings - Fork 796
[SYCL][SPIR-V][New offload model] Update SPIR-V extension list for new offloading model and add new SPIR-V extension test #15748
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
Changes from 2 commits
3377fda
dbc4829
f9fc3be
071c62d
4bdc46e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,108 @@ | ||
| // REQUIRES: system-linux | ||
| // ------- | ||
| // Generate .o file as SYCL device library file. | ||
| // | ||
| // RUN: touch %t.devicelib.cpp | ||
| // RUN: %clang %t.devicelib.cpp -fsycl -fsycl-targets=spir64-unknown-unknown -c --offload-new-driver -o %t_1.devicelib.o | ||
| // RUN: %clang %t.devicelib.cpp -fsycl -fsycl-targets=spir64_gen-unknown-unknown -c --offload-new-driver -o %t_2.devicelib.o | ||
| // RUN: %clang %t.devicelib.cpp -fsycl -fsycl-targets=spir64_x86_64-unknown-unknown -c --offload-new-driver -o %t_3.devicelib.o | ||
|
|
||
| /// Check llvm-spirv extensions that are set | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe add a space so this comment stands out? |
||
|
|
||
| // RUN: %clang -target x86_64-unknown-linux-gnu -fsycl --offload-new-driver \ | ||
| // RUN: -fsycl-targets=spir64-unknown-unknown -c %s -o %t_1.o | ||
| // RUN: clang-linker-wrapper -sycl-device-libraries=%t_1.devicelib.o \ | ||
| // RUN: "--host-triple=x86_64-unknown-linux-gnu" "--linker-path=/usr/bin/ld" \ | ||
| // RUN: "--" HOST_LINKER_FLAGS "-dynamic-linker" HOST_DYN_LIB "-o" "a.out" \ | ||
| // RUN: HOST_LIB_PATH HOST_STAT_LIB %t_1.o --dry-run 2>&1 \ | ||
mdtoguchi marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| // RUN: | FileCheck -check-prefix=CHECK-DEFAULT %s | ||
| // RUN: %clang -target x86_64-unknown-linux-gnu -fsycl --offload-new-driver \ | ||
| // RUN: -fsycl-targets=spir64_gen-unknown-unknown -c %s -o %t_2.o | ||
| // RUN: clang-linker-wrapper -sycl-device-libraries=%t_2.devicelib.o \ | ||
| // RUN: "--host-triple=x86_64-unknown-linux-gnu" "--linker-path=/usr/bin/ld" \ | ||
| // RUN: "--" HOST_LINKER_FLAGS "-dynamic-linker" HOST_DYN_LIB "-o" "a.out" \ | ||
| // RUN: HOST_LIB_PATH HOST_STAT_LIB %t_2.o --dry-run 2>&1 \ | ||
| // RUN: | FileCheck -check-prefix=CHECK-DEFAULT %s | ||
| // RUN: %clang -target x86_64-unknown-linux-gnu -fsycl --offload-new-driver \ | ||
| // RUN: -fsycl-targets=spir64_x86_64-unknown-unknown -c %s -o %t_3.o | ||
| // RUN: clang-linker-wrapper -sycl-device-libraries=%t_3.devicelib.o \ | ||
| // RUN: "--host-triple=x86_64-unknown-linux-gnu" "--linker-path=/usr/bin/ld" \ | ||
| // RUN: "--" HOST_LINKER_FLAGS "-dynamic-linker" HOST_DYN_LIB "-o" "a.out" \ | ||
| // RUN: HOST_LIB_PATH HOST_STAT_LIB %t_3.o --dry-run 2>&1 \ | ||
| // RUN: | FileCheck -check-prefix=CHECK-CPU %s | ||
|
|
||
| // CHECK-DEFAULT: llvm-spirv{{.*}}-spirv-ext=-all | ||
| // CHECK-DEFAULT-SAME:,+SPV_EXT_shader_atomic_float_add | ||
| // CHECK-DEFAULT-SAME:,+SPV_EXT_shader_atomic_float_min_max | ||
| // CHECK-DEFAULT-SAME:,+SPV_KHR_no_integer_wrap_decoration,+SPV_KHR_float_controls | ||
| // CHECK-DEFAULT-SAME:,+SPV_KHR_expect_assume,+SPV_KHR_linkonce_odr | ||
| // CHECK-DEFAULT-SAME:,+SPV_INTEL_subgroups,+SPV_INTEL_media_block_io | ||
| // CHECK-DEFAULT-SAME:,+SPV_INTEL_device_side_avc_motion_estimation | ||
| // CHECK-DEFAULT-SAME:,+SPV_INTEL_fpga_loop_controls | ||
| // CHECK-DEFAULT-SAME:,+SPV_INTEL_unstructured_loop_controls,+SPV_INTEL_fpga_reg | ||
| // CHECK-DEFAULT-SAME:,+SPV_INTEL_blocking_pipes,+SPV_INTEL_function_pointers | ||
| // CHECK-DEFAULT-SAME:,+SPV_INTEL_kernel_attributes,+SPV_INTEL_io_pipes | ||
| // CHECK-DEFAULT-SAME:,+SPV_INTEL_inline_assembly,+SPV_INTEL_arbitrary_precision_integers | ||
| // CHECK-DEFAULT-SAME:,+SPV_INTEL_float_controls2 | ||
| // CHECK-DEFAULT-SAME:,+SPV_INTEL_vector_compute,+SPV_INTEL_fast_composite | ||
| // CHECK-DEFAULT-SAME:,+SPV_INTEL_arbitrary_precision_fixed_point | ||
| // CHECK-DEFAULT-SAME:,+SPV_INTEL_arbitrary_precision_floating_point | ||
| // CHECK-DEFAULT-SAME:,+SPV_INTEL_variable_length_array,+SPV_INTEL_fp_fast_math_mode | ||
| // CHECK-DEFAULT-SAME:,+SPV_INTEL_long_constant_composite | ||
| // CHECK-DEFAULT-SAME:,+SPV_INTEL_arithmetic_fence | ||
| // CHECK-DEFAULT-SAME:,+SPV_INTEL_cache_controls | ||
| // CHECK-DEFAULT-SAME:,+SPV_INTEL_fpga_buffer_location | ||
| // CHECK-DEFAULT-SAME:,+SPV_INTEL_fpga_argument_interfaces | ||
| // CHECK-DEFAULT-SAME:,+SPV_INTEL_fpga_invocation_pipelining_attributes | ||
| // CHECK-DEFAULT-SAME:,+SPV_INTEL_fpga_latency_control | ||
| // CHECK-DEFAULT-SAME:,+SPV_KHR_shader_clock | ||
| // CHECK-DEFAULT-SAME:,+SPV_INTEL_bindless_images | ||
| // CHECK-DEFAULT-SAME:,+SPV_INTEL_task_sequence | ||
| // CHECK-DEFAULT-SAME:,+SPV_INTEL_token_type | ||
| // CHECK-DEFAULT-SAME:,+SPV_INTEL_bfloat16_conversion | ||
| // CHECK-DEFAULT-SAME:,+SPV_INTEL_joint_matrix | ||
| // CHECK-DEFAULT-SAME:,+SPV_INTEL_hw_thread_queries | ||
| // CHECK-DEFAULT-SAME:,+SPV_KHR_uniform_group_instructions | ||
| // CHECK-DEFAULT-SAME:,+SPV_INTEL_masked_gather_scatter | ||
| // CHECK-DEFAULT-SAME:,+SPV_INTEL_tensor_float32_conversion | ||
| // CHECK-DEFAULT-SAME:,+SPV_INTEL_optnone | ||
| // CHECK-DEFAULT-SAME:,+SPV_KHR_non_semantic_info | ||
| // CHECK-DEFAULT-SAME:,+SPV_KHR_cooperative_matrix | ||
| // CHECK-DEFAULT-SAME:,+SPV_EXT_shader_atomic_float16_add | ||
|
|
||
| // CHECK-CPU: llvm-spirv{{.*}}-spirv-ext=-all | ||
| // CHECK-CPU-SAME:,+SPV_EXT_shader_atomic_float_add | ||
| // CHECK-CPU-SAME:,+SPV_EXT_shader_atomic_float_min_max | ||
| // CHECK-CPU-SAME:,+SPV_KHR_no_integer_wrap_decoration,+SPV_KHR_float_controls | ||
| // CHECK-CPU-SAME:,+SPV_KHR_expect_assume,+SPV_KHR_linkonce_odr | ||
| // CHECK-CPU-SAME:,+SPV_INTEL_subgroups,+SPV_INTEL_media_block_io | ||
| // CHECK-CPU-SAME:,+SPV_INTEL_device_side_avc_motion_estimation | ||
| // CHECK-CPU-SAME:,+SPV_INTEL_fpga_loop_controls | ||
| // CHECK-CPU-SAME:,+SPV_INTEL_unstructured_loop_controls,+SPV_INTEL_fpga_reg | ||
| // CHECK-CPU-SAME:,+SPV_INTEL_blocking_pipes,+SPV_INTEL_function_pointers | ||
| // CHECK-CPU-SAME:,+SPV_INTEL_kernel_attributes,+SPV_INTEL_io_pipes | ||
| // CHECK-CPU-SAME:,+SPV_INTEL_inline_assembly,+SPV_INTEL_arbitrary_precision_integers | ||
| // CHECK-CPU-SAME:,+SPV_INTEL_float_controls2 | ||
| // CHECK-CPU-SAME:,+SPV_INTEL_vector_compute,+SPV_INTEL_fast_composite | ||
| // CHECK-CPU-SAME:,+SPV_INTEL_arbitrary_precision_fixed_point | ||
| // CHECK-CPU-SAME:,+SPV_INTEL_arbitrary_precision_floating_point | ||
| // CHECK-CPU-SAME:,+SPV_INTEL_variable_length_array,+SPV_INTEL_fp_fast_math_mode | ||
| // CHECK-CPU-SAME:,+SPV_INTEL_long_constant_composite | ||
| // CHECK-CPU-SAME:,+SPV_INTEL_arithmetic_fence | ||
| // CHECK-CPU-SAME:,+SPV_INTEL_cache_controls | ||
| // CHECK-CPU-SAME:,+SPV_INTEL_fpga_buffer_location | ||
| // CHECK-CPU-SAME:,+SPV_INTEL_fpga_argument_interfaces | ||
| // CHECK-CPU-SAME:,+SPV_INTEL_fpga_invocation_pipelining_attributes | ||
| // CHECK-CPU-SAME:,+SPV_INTEL_fpga_latency_control | ||
| // CHECK-CPU-SAME:,+SPV_INTEL_task_sequence | ||
| // CHECK-CPU-SAME:,+SPV_INTEL_token_type | ||
| // CHECK-CPU-SAME:,+SPV_INTEL_bfloat16_conversion | ||
| // CHECK-CPU-SAME:,+SPV_INTEL_joint_matrix | ||
| // CHECK-CPU-SAME:,+SPV_INTEL_hw_thread_queries | ||
| // CHECK-CPU-SAME:,+SPV_KHR_uniform_group_instructions | ||
| // CHECK-CPU-SAME:,+SPV_INTEL_masked_gather_scatter | ||
| // CHECK-CPU-SAME:,+SPV_INTEL_tensor_float32_conversion | ||
| // CHECK-CPU-SAME:,+SPV_INTEL_optnone | ||
| // CHECK-CPU-SAME:,+SPV_KHR_non_semantic_info | ||
| // CHECK-CPU-SAME:,+SPV_KHR_cooperative_matrix | ||
| // CHECK-CPU-SAME:,+SPV_INTEL_fp_max_error | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -872,9 +872,9 @@ getTripleBasedSPIRVTransOpts(const ArgList &Args, | |
| ",+SPV_INTEL_fpga_argument_interfaces" | ||
| ",+SPV_INTEL_fpga_invocation_pipelining_attributes" | ||
| ",+SPV_INTEL_fpga_latency_control" | ||
| ",+SPV_INTEL_task_sequence" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this part of the change NFC or does the order matter?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Order does seem to matter. Test fails otherwise. |
||
| ",+SPV_KHR_shader_clock" | ||
| ",+SPV_INTEL_bindless_images"; | ||
| ",+SPV_INTEL_bindless_images" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. reading the change title i thought this was a test only change, maybe we could rename it to |
||
| ",+SPV_INTEL_task_sequence"; | ||
| ExtArg = ExtArg + DefaultExtArg + INTELExtArg; | ||
| ExtArg += ",+SPV_INTEL_token_type" | ||
| ",+SPV_INTEL_bfloat16_conversion" | ||
|
|
@@ -885,7 +885,8 @@ getTripleBasedSPIRVTransOpts(const ArgList &Args, | |
| ",+SPV_INTEL_tensor_float32_conversion" | ||
| ",+SPV_INTEL_optnone" | ||
| ",+SPV_KHR_non_semantic_info" | ||
| ",+SPV_KHR_cooperative_matrix"; | ||
| ",+SPV_KHR_cooperative_matrix" | ||
| ",+SPV_EXT_shader_atomic_float16_add"; | ||
| if (IsCPU) | ||
| ExtArg += ",+SPV_INTEL_fp_max_error"; | ||
| TranslatorArgs.push_back(Args.MakeArgString(ExtArg)); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.