Skip to content

PY-CUDA0002 · legacy_default_stream_launch

Count CUDA core launches submitted to the legacy default stream.

This is a deterministic rule for python. Read its implementation.

Report cuda.core.launch when its first argument is LEGACY_DEFAULT_STREAM. Work on the legacy default stream does not execute concurrently with work on other streams, so one launch can serialize an otherwise asynchronous pipeline.

Each finding identifies the launch call. The value is the number of launches that explicitly select the legacy default stream.

PER_THREAD_DEFAULT_STREAM is accepted because it can overlap nonblocking streams. An owned stream created through a device is accepted and remains the clearest contract.

launch(LEGACY_DEFAULT_STREAM, config, kernel, output)
stream = device.create_stream()
launch(stream, config, kernel, output)
  • Cites “cuda.core documentation”, legacy and per-thread default streams. Open reference
  • Cites “CUDA C++ Programming Guide”, default stream behavior. Open reference