NVIDIA / NVIDIA/cuda-python

Avoid referencing the current device in `LaunchConfig`

Open
#704 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cuda.core enhancement P1
Dominant language
Cython
Stars
3.4k
Forks
329
Avg merge
1d 23h
Merged PRs (30d)
116

Description

This is strictly speaking not 100% safe:
https://github.com/NVIDIA/cuda-python/blob/bf590e4301c36879410c3f84dad265c641362926/cuda_core/cuda/core/experimental/_launch_config.py#L68-L86
because we could be changing the device after creating a launch config and before we use it to launch a kernel (on another device).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with cuda_core/cuda/core/experimental/_launch_config.py at lines 68-86, then trace how LaunchConfig is used to launch a kernel. Check the behavior when the device changes between creating the launch configuration and launching the kernel. Done means LaunchConfig does not incorrectly depend on the current device in that interval.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
hpc
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.