|
| 1 | +; Original code: |
| 2 | +; Compile with: clang++ -fsycl -fsycl-device-only -fno-sycl-instrument-device-code -D__SYCL_DISABLE_PARALLEL_FOR_RANGE_ROUNDING__ -S reqd-sub-group-size.cpp |
| 3 | +; #include <sycl/sycl.hpp> |
| 4 | + |
| 5 | +; int main() { |
| 6 | +; sycl::queue q; |
| 7 | +; q.submit([&](sycl::handler &h) { |
| 8 | +; h.parallel_for<class KernelA>( |
| 9 | +; sycl::range<1>(32), |
| 10 | +; [=](sycl::item<1> it) [[sycl::reqd_sub_group_size(16)]] {}); |
| 11 | +; }); |
| 12 | +; q.submit([&](sycl::handler &h) { |
| 13 | +; h.parallel_for<class KernelB>( |
| 14 | +; sycl::range<1>(32), |
| 15 | +; [=](sycl::item<1> it) [[sycl::reqd_sub_group_size(32)]] {}); |
| 16 | +; }); |
| 17 | +; q.submit([&](sycl::handler &h) { |
| 18 | +; h.parallel_for<class KernelC>( |
| 19 | +; sycl::range<1>(32), |
| 20 | +; [=](sycl::item<1> it) [[sycl::reqd_sub_group_size(16)]] {}); |
| 21 | +; }); |
| 22 | +; return 0; |
| 23 | +; } |
| 24 | + |
| 25 | +; RUN: sycl-post-link -split=auto %s -o %t.table |
| 26 | +; RUN: FileCheck %s -input-file=%t_0.prop --check-prefix CHECK-PROP-AUTO-SPLIT-0 |
| 27 | +; RUN: FileCheck %s -input-file=%t_1.prop --check-prefix CHECK-PROP-AUTO-SPLIT-1 |
| 28 | + |
| 29 | +; CHECK-PROP-AUTO-SPLIT-0: [SYCL/device requirements] |
| 30 | +; CHECK-PROP-AUTO-SPLIT-0: reqd_sub_group_size=1|32 |
| 31 | + |
| 32 | +; CHECK-PROP-AUTO-SPLIT-1: [SYCL/device requirements] |
| 33 | +; CHECK-PROP-AUTO-SPLIT-1: reqd_sub_group_size=1|16 |
| 34 | + |
| 35 | +; ModuleID = 'foo.cpp' |
| 36 | +source_filename = "foo.cpp" |
| 37 | +target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64" |
| 38 | +target triple = "spir64-unknown-unknown" |
| 39 | + |
| 40 | +$_ZTSZZ4mainENKUlRN4sycl3_V17handlerEE_clES2_E7KernelA = comdat any |
| 41 | + |
| 42 | +$_ZTSZZ4mainENKUlRN4sycl3_V17handlerEE0_clES2_E7KernelB = comdat any |
| 43 | + |
| 44 | +$_ZTSZZ4mainENKUlRN4sycl3_V17handlerEE1_clES2_E7KernelC = comdat any |
| 45 | + |
| 46 | +; Function Attrs: norecurse nounwind |
| 47 | +define weak_odr dso_local spir_kernel void @_ZTSZZ4mainENKUlRN4sycl3_V17handlerEE_clES2_E7KernelA() local_unnamed_addr #0 comdat !srcloc !48 !kernel_arg_buffer_location !49 !intel_reqd_sub_group_size !50 !sycl_fixed_targets !49 !sycl_kernel_omit_args !49 { |
| 48 | +entry: |
| 49 | + ret void |
| 50 | +} |
| 51 | + |
| 52 | +; Function Attrs: norecurse nounwind |
| 53 | +define weak_odr dso_local spir_kernel void @_ZTSZZ4mainENKUlRN4sycl3_V17handlerEE0_clES2_E7KernelB() local_unnamed_addr #0 comdat !srcloc !51 !kernel_arg_buffer_location !49 !intel_reqd_sub_group_size !52 !sycl_fixed_targets !49 !sycl_kernel_omit_args !49 { |
| 54 | +entry: |
| 55 | + ret void |
| 56 | +} |
| 57 | + |
| 58 | +; Function Attrs: norecurse nounwind |
| 59 | +define weak_odr dso_local spir_kernel void @_ZTSZZ4mainENKUlRN4sycl3_V17handlerEE1_clES2_E7KernelC() local_unnamed_addr #0 comdat !srcloc !53 !kernel_arg_buffer_location !49 !intel_reqd_sub_group_size !50 !sycl_fixed_targets !49 !sycl_kernel_omit_args !49 { |
| 60 | +entry: |
| 61 | + ret void |
| 62 | +} |
| 63 | + |
| 64 | +attributes #0 = { norecurse nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "sycl-module-id"="foo.cpp" "sycl-optlevel"="2" "uniform-work-group-size"="true" } |
| 65 | + |
| 66 | +!llvm.module.flags = !{!0, !1} |
| 67 | +!opencl.spir.version = !{!2} |
| 68 | +!spirv.Source = !{!3} |
| 69 | +!sycl_aspects = !{!4, !5, !6, !7, !8, !9, !10, !11, !12, !13, !14, !15, !16, !17, !18, !19, !20, !21, !22, !23, !24, !25, !26, !27, !28, !29, !30, !31, !32, !33, !34, !35, !36, !37, !38, !39, !40, !41, !42, !43, !44, !45, !46} |
| 70 | +!llvm.ident = !{!47} |
| 71 | + |
| 72 | +!0 = !{i32 1, !"wchar_size", i32 4} |
| 73 | +!1 = !{i32 7, !"frame-pointer", i32 2} |
| 74 | +!2 = !{i32 1, i32 2} |
| 75 | +!3 = !{i32 4, i32 100000} |
| 76 | +!4 = !{!"cpu", i32 1} |
| 77 | +!5 = !{!"gpu", i32 2} |
| 78 | +!6 = !{!"accelerator", i32 3} |
| 79 | +!7 = !{!"custom", i32 4} |
| 80 | +!8 = !{!"fp16", i32 5} |
| 81 | +!9 = !{!"fp64", i32 6} |
| 82 | +!10 = !{!"image", i32 9} |
| 83 | +!11 = !{!"online_compiler", i32 10} |
| 84 | +!12 = !{!"online_linker", i32 11} |
| 85 | +!13 = !{!"queue_profiling", i32 12} |
| 86 | +!14 = !{!"usm_device_allocations", i32 13} |
| 87 | +!15 = !{!"usm_host_allocations", i32 14} |
| 88 | +!16 = !{!"usm_shared_allocations", i32 15} |
| 89 | +!17 = !{!"usm_system_allocations", i32 17} |
| 90 | +!18 = !{!"ext_intel_pci_address", i32 18} |
| 91 | +!19 = !{!"ext_intel_gpu_eu_count", i32 19} |
| 92 | +!20 = !{!"ext_intel_gpu_eu_simd_width", i32 20} |
| 93 | +!21 = !{!"ext_intel_gpu_slices", i32 21} |
| 94 | +!22 = !{!"ext_intel_gpu_subslices_per_slice", i32 22} |
| 95 | +!23 = !{!"ext_intel_gpu_eu_count_per_subslice", i32 23} |
| 96 | +!24 = !{!"ext_intel_max_mem_bandwidth", i32 24} |
| 97 | +!25 = !{!"ext_intel_mem_channel", i32 25} |
| 98 | +!26 = !{!"usm_atomic_host_allocations", i32 26} |
| 99 | +!27 = !{!"usm_atomic_shared_allocations", i32 27} |
| 100 | +!28 = !{!"atomic64", i32 28} |
| 101 | +!29 = !{!"ext_intel_device_info_uuid", i32 29} |
| 102 | +!30 = !{!"ext_oneapi_srgb", i32 30} |
| 103 | +!31 = !{!"ext_oneapi_native_assert", i32 31} |
| 104 | +!32 = !{!"host_debuggable", i32 32} |
| 105 | +!33 = !{!"ext_intel_gpu_hw_threads_per_eu", i32 33} |
| 106 | +!34 = !{!"ext_oneapi_cuda_async_barrier", i32 34} |
| 107 | +!35 = !{!"ext_oneapi_bfloat16_math_functions", i32 35} |
| 108 | +!36 = !{!"ext_intel_free_memory", i32 36} |
| 109 | +!37 = !{!"ext_intel_device_id", i32 37} |
| 110 | +!38 = !{!"ext_intel_memory_clock_rate", i32 38} |
| 111 | +!39 = !{!"ext_intel_memory_bus_width", i32 39} |
| 112 | +!40 = !{!"emulated", i32 40} |
| 113 | +!41 = !{!"ext_intel_legacy_image", i32 41} |
| 114 | +!42 = !{!"int64_base_atomics", i32 7} |
| 115 | +!43 = !{!"int64_extended_atomics", i32 8} |
| 116 | +!44 = !{!"usm_system_allocator", i32 17} |
| 117 | +!45 = !{!"usm_restricted_shared_allocations", i32 16} |
| 118 | +!46 = !{!"host", i32 0} |
| 119 | +!47 = !{!"clang version 17.0.0 (https://github.com/jzc/llvm eed5b5576bef314433e8ae7313620dae399c9d22)"} |
| 120 | +!48 = !{i32 170} |
| 121 | +!49 = !{} |
| 122 | +!50 = !{i32 16} |
| 123 | +!51 = !{i32 351} |
| 124 | +!52 = !{i32 32} |
| 125 | +!53 = !{i32 532} |
0 commit comments