Getting tvm-generated cuda codes

Hi

I read tvm osdi paper and, for re-running experiments in the paper, found some method for automated search(they are in ‘autotvm’)

But i didn’t find the method that check where generated cuda cude(particularly, codes about convolution operation and gemm) is.

how can i find or get cuda codes generated by tvm?

If there is an answer, it will be helpful!

Thanks!

You can have a look at an example of dumping generated cuda code here.

1 Like

hi the link are not available, can u send the other link that show dumping generated cuda code please?

Hi @lawpowen, this is likely what you’re looking for: Working with Operators Using Tensor Expression — tvm 0.9.dev0 documentation

thank you so much , i will have a look to this doc!

@carl-tercero

How to generate cuda code?

The code generated from the example is not cuda code.

For example, I can use tvm.build(ir, [A], target=‘c’) to generate c code.

But how to generate cuda code?

Use target=‘cuda’

Here is an example

func = tvm.build(s, [A, B, C], target="cuda")
dev_module = func.imported_modules[0]
print(dev_module.get_source())