[llvm] [offload] Add properties parameter to olLaunchKernel (PR #184343)
Ćukasz Plewa via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 4 09:50:51 PST 2026
================
@@ -1257,8 +1263,21 @@ struct CUDADeviceTy : public GenericDeviceTy {
Info.add("Preemption Supported", (bool)TmpInt);
Res = getDeviceAttrRaw(CU_DEVICE_ATTRIBUTE_COOPERATIVE_LAUNCH, TmpInt);
- if (Res == CUDA_SUCCESS)
- Info.add("Cooperative Launch", (bool)TmpInt);
+ if (Res == CUDA_SUCCESS) {
+ // Cooperative launch requires CUDA 11.0+ for cuLaunchKernelEx API.
+ // The older cuLaunchCooperative API does not support passing kernel
+ // arguments as a buffer (kernelParams config). cuLaunchKernelEx was
+ // introduced in CUDA 11.0 and supports both cooperative launch
+ // attributes and proper kernel argument buffer passing.
+ int DriverVersion = 0;
+ if (auto Node = Info.get(DeviceInfo::DRIVER_VERSION)) {
+ if (auto *StrVal = std::get_if<std::string>(&(*Node)->Value))
+ DriverVersion = std::stoi(*StrVal);
+ }
+ bool SupportsCooperative = (bool)TmpInt && DriverVersion >= 11000;
----------------
lplewa wrote:
done - i fixed it everywhere
https://github.com/llvm/llvm-project/pull/184343
More information about the llvm-commits
mailing list