intel / llvm

Intel staging area for llvm.org contribution. Home for Intel LLVM-based projects.
Other
1.22k stars 730 forks source link

[SYCL] migrate max threads per multiprocessor in CUDA and HIP #7997

Open zjin-lcf opened 1 year ago

zjin-lcf commented 1 year ago

Please see the code sample in CUDA. Users are not sure if they could compute the value in SYCL using an alternative way. Thanks.

cudaDeviceProp deviceProp;
  cudaGetDeviceProperties(&deviceProp, Device);
  const int mTpSM = deviceProp.maxThreadsPerMultiProcessor;
JackAKirk commented 1 year ago

This would require an extension for a device property that can query for CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR in pi_cuda.cpp

zjin-lcf commented 1 year ago

The device property may be max work items per compute unit. This property may be supported by Intel GPUs too.
https://github.com/oneapi-src/SYCLomatic/issues/496

zjin-lcf commented 1 year ago

The property is commonly used in GPU programs written by researchers https://userweb.cs.txstate.edu/~burtscher/publications.html

zjin-lcf commented 6 months ago

@dm-vodopyanov Did you have any updates about this ?