[BUG]: the `__cuda_stream__` deprecation warning points to `Stream(obj)`, which always raises
維護者通常 1 天內回覆
評估
研究方向
issue 指出位置是 _stream.pyx,並說明傳入帶有 __cuda_stream__ 的物件時,錯誤警告來自 launch()。閱讀警告文字,並將其與重現範例中顯示的可正常運作呼叫 Device.create_stream(obj) 進行比較。警告指出該受支援的呼叫後即算完成;issue 將此描述為一行變更。
由索引模型根據 Issue 內容生成。
描述
Is this a duplicate?
- I confirmed there appear to be no duplicate issues for this bug and that I agree to the Code of Conduct
Type of Bug
Something else
Component
cuda.core
Describe the bug
passing an object with __cuda_stream__ to launch() warns and says to wrap it with Stream(obj). Stream.__init__ always raises though, so following the warning doesn't work, Device.create_stream(obj) is the call that does
How to Reproduce
import numpy as np
from cuda.core import Device, Program, LaunchConfig, Stream, launch
d = Device(); d.set_current(); s = d.create_stream()
ker = Program('extern "C" __global__ void k(int x){}', "c++").compile("cubin").get_kernel("k")
class W:
def __cuda_stream__(self):
return (0, int(s.handle))
launch(W(), LaunchConfig(grid=1, block=1), ker, np.int32(1)) # warning says to use Stream(obj)
d.create_stream(W()) # works
Stream(W()) # RuntimeError: Stream objects cannot be instantiated directly...
Expected behavior
the warning names Device.create_stream(obj). it's a one line change in _stream.pyx, glad to send it if someone assigns this to me
Operating System
Windows 11, RTX 4060 Ti, cuda.core built from main (84e50ca49)
nvidia-smi output
No response
- 主要語言
- Cython
- 星號
- 3.4k
- 分支
- 353
- 平均合併
- 2 天 3 小時
- 30 天內合併 PR
- 163
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
NVIDIA/cuda-python 的其他 Issue
-
[BUG]: ProcessInfo.used_gpu_memory returns the NVML_VALUE_NOT_AVAILABLE sentinel as a byte count未關閉triage
難度 2/5 1-3 小時 新手友好度 80/100
NVIDIA/cuda-python#3468 · 3 則留言 ·
維護者通常 1 天內回覆
-
triage
難度 2/5 1-3 小時 新手友好度 68/100
NVIDIA/cuda-python#3409 ·
維護者通常 1 天內回覆
-
[BUG]: cleanup-pr-previews never removes previews of deleted PRs可能重新可做 @rwgk 於 48 天前認領,目前沒有進行中的 PR。 未關閉
難度 2/5 1-3 小時 新手友好度 84/100
NVIDIA/cuda-python#2952 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
[BUG]: LocatedHeaderDir is mutable, so callers can poison the cached header-directory lookup可能已有人在做 @rwgk 於 62 天前認領。 未關閉triage
難度 2/5 1-3 小時 新手友好度 82/100
NVIDIA/cuda-python#2646 · 1 個 reaction ·
維護者通常 1 天內回覆
-
documentation
難度 4/5 3-5 天 新手友好度 35/100
NVIDIA/cuda-python#3617 ·
維護者通常 1 天內回覆
查看 NVIDIA/cuda-python 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 72/100
vllm-project/vllm#70030 ·
維護者通常 1 天內回覆
-
help wanted small extra
難度 2/5 1-3 小時 新手友好度 70/100
維護者通常 1 天內回覆
-
t: bug
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 3 天內回覆
-
Retry an empty final answer when Gemini reports MALFORMED_RESPONSE (gemini-4-hydrogen)可能已有人在做 @waleedkadous 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 62/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 66/100
維護者通常 1 天內回覆