microsoft / nnfusion

A flexible and efficient deep neural network (DNN) compiler that generates high-performance executable from a DNN model description.
MIT License
959 stars 163 forks source link

Having trouble using tools/nnfusion/kernel_db #312

Closed kk2049 closed 3 years ago

kk2049 commented 3 years ago

Hello! I am trying to use this program in src/tools/nnfusion/kernel_db, but I can't find the Makefile this command tries to call: https://github.com/microsoft/nnfusion/blob/master/src/tools/nnfusion/kernel_db/profile.py#L163 I do find a Makefile in this older branch(https://github.com/microsoft/nnfusion/blob/osdi20_artifact/artifacts/kernel_db/kernel_db_scripts/Makefile), but this Makefile won't work because there is no .cu file in this folder. Can anyone help me?

xysmlx commented 3 years ago

Hi, the Makefile will be automatically generated by profile.py. You can try python convert_external.py sample_fused_conv_add_relu_alexnet.json. And you can see the generated kernel_cache.db file in ~/.cache/nnfusion/.

Note that this script only includes sm_70 (Tesla V100) in the compilation flag. If you want to run it on other CUDA GPUs, you may need to modify here.

kk2049 commented 3 years ago

This works! Thanks a lot!