coreylowman / cudarc

Safe rust wrapper around CUDA toolkit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add `cudaFuncSetAttribute`

EricLBuehler opened this issue · comments

Hello @coreylowman,

I have been working on candle-vllm and realized their implementation used cudaFuncSetAttribute and cudaFuncAttributeMaxDynamicSharedMemorySize to set the max shared memory size. How could I emulate this behavior in Rust using this framework?

Hello @coreylowman,

I have been working on candle-vllm and realized their implementation used cudaFuncSetAttribute and cudaFuncAttributeMaxDynamicSharedMemorySize to set the max shared memory size. How could I emulate this behavior in Rust using this framework?

You may use cuFuncSetAttribute and cuFuncSetSharedMemConfig in this crate. See this: https://github.com/coreylowman/cudarc/blob/main/src/driver/sys.rs.

Thank you!