numba/numba

CUDA: Add accessors for function attributes beyond just register use per thread

Open

#6,448 创建于 2020年11月3日

在 GitHub 查看
 (2 评论) (0 反应) (0 负责人)Python (1,132 fork)batch import
CUDAgood first issue

仓库指标

Star
 (9,177 star)
PR 合并指标
 (平均合并 14天 16小时) (30 天内合并 30 个 PR)

描述

PR #6447 adds a public API to get the maximum number of registers per thread (numba.cuda.Dispatcher.get_regs_per_thread()). There are other attributes that might be nice to provide - shared memory per block, local memory per thread, const memory usage, maximum block size.

These are all available in the FuncAttr named tuple: https://github.com/numba/numba/blob/master/numba/cuda/cudadrv/driver.py#L2023, set by _read_func_attr_all: https://github.com/numba/numba/blob/master/numba/cuda/cudadrv/driver.py#L2067

Cross ref: adding these would provide some of the info in the ptxas output requested in #3482.

贡献者指南