-
Notifications
You must be signed in to change notification settings - Fork 225
Open
Labels
P1Medium priority - Should doMedium priority - Should docuda.coreEverything related to the cuda.core moduleEverything related to the cuda.core moduleenhancementAny code-related improvementsAny code-related improvements
Milestone
Description
This is strictly speaking not 100% safe:
cuda-python/cuda_core/cuda/core/experimental/_launch_config.py
Lines 68 to 86 in bf590e4
| # FIXME: Calling Device() strictly speaking is not quite right; we should instead | |
| # look up the device from stream. We probably need to defer the checks related to | |
| # device compute capability or attributes. | |
| # thread block clusters are supported starting H100 | |
| if self.cluster is not None: | |
| if not _use_ex: | |
| err, drvers = driver.cuDriverGetVersion() | |
| drvers_fmt = f" (got driver version {drvers})" if err == driver.CUresult.CUDA_SUCCESS else "" | |
| raise CUDAError(f"thread block clusters require cuda.bindings & driver 11.8+{drvers_fmt}") | |
| cc = Device().compute_capability | |
| if cc < (9, 0): | |
| raise CUDAError( | |
| f"thread block clusters are not supported on devices with compute capability < 9.0 (got {cc})" | |
| ) | |
| self.cluster = cast_to_3_tuple("LaunchConfig.cluster", self.cluster) | |
| if self.shmem_size is None: | |
| self.shmem_size = 0 | |
| if self.cooperative_launch and not Device().properties.cooperative_launch: | |
| raise CUDAError("cooperative kernels are not supported on this device") |
because we could be changing the device after creating a launch config and before we use it to launch a kernel (on another device).
Metadata
Metadata
Assignees
Labels
P1Medium priority - Should doMedium priority - Should docuda.coreEverything related to the cuda.core moduleEverything related to the cuda.core moduleenhancementAny code-related improvementsAny code-related improvements
Type
Projects
Status
Todo