coreylowman / cudarc

Safe rust wrapper around CUDA toolkit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Possible to use #![feature(abi_ptx)]?

coreylowman opened this issue · comments

Using https://doc.rust-lang.org/unstable-book/language-features/abi-ptx.html, you can compile rust functions to PTX on nightly compiler. How can we use this with cudarc?

Looking at the tracking issue rust-lang/rust#38788, the feature seems to be in very early stages. It looks very exciting, but maybe not usable yet?

@ViliamVadocz Here I build rs into ptx separately with xargo and nightly Rust.

I haven't been able to replace the let ptx = compile_ptx(KERNEL_SRC).unwrap(); lines in this example with let ptx = Ptx::from_file(r"path\to\ptx-number.s"); yet. I get Error: DriverError(CUDA_ERROR_INVALID_PTX, "a PTX JIT compilation failed").