taco icon indicating copy to clipboard operation
taco copied to clipboard

How to generate cuda kernel with python bindings?

Open gxiaotian opened this issue 3 years ago • 3 comments

I would like to use pytaco to generate cuda kernels, but cannot find relevant information in this doc, so I was wondering if pytaco can generate cuda kernels, if yes, how to do it. Thanks~

gxiaotian avatar Aug 01 '22 16:08 gxiaotian

I don't think that the Python API is currently able to generate CUDA kernels. You will have to use the C++ API or the web tool to do so.

rohany avatar Sep 07 '22 16:09 rohany

Can you provide an example of generating CUDA kernels using TACO? I have it installed locally.

rdguerrerom avatar Jan 24 '23 12:01 rdguerrerom

Here is an example of generating a GPU-based SpMV kernel using the TACO CLI: http://tensor-compiler.org/codegen.html?expr=y(i)%20=%20A(i,j)%20*%20x(j)&format=y:d:0;A:ds:0,1;x:d:0&sched=fuse:i:j:f;pos:f:fpos:A;split:fpos:block:fpos1:3584;split:fpos1:warp:fpos2:224;split:fpos2:thread:thr_nz:7;reorder:block:warp:thread:thr_nz;precompute:A(i,%20j)%20*%20x(j):thr_nz:thr_nz_pre;unroll:thr_nz_pre:7;parallelize:block:GPU%20Block:Ignore%20Races;parallelize:warp:GPU%20Warp:Ignore%20Races;parallelize:thread:GPU%20Thread:Atomics.

rohany avatar Jan 24 '23 17:01 rohany