traveller59 / spconv

Spatial Sparse Convolution Library
Apache License 2.0
1.83k stars 362 forks source link

NVRTC: How to implement cached_get_nvrtc_params in C++? Where is its overridden implementation in python? #618

Open HoiM opened 1 year ago

HoiM commented 1 year ago

When I was creating the TensorRT plugin using libspconv, I encountered that cached_get_nvrtc_params got called. I know the reason is that deps.is_nvrtc is true (in ConvTunerSimple_tune_and_cache.cc). And then the convolution was thus not done successfully, showing:

........./third_party/libspconv/spconv/src/spconvlib/spconv/csrc/sparse/convops/convops/ConvTunerSimple/ConvTunerSimple_cached_get_nvrtc_params.cc(18) not implemented in c++, must be overrided in python!!!

Can anyone explain why this happens? Is it possible to solve this problem? I did not find the overridden implementation in python either.

HoiM commented 1 year ago

By adding desp.nvtrc=false before the if statement in the following file, ........./third_party/libspconv/spconv/src/spconvlib/spconv/csrc/sparse/convops/convops/ConvTunerSimple/ConvTunerSimple_cached_get_nvrtc_params.cc(18) we sidestepped this problem.

But if I would like to implement NVRTC in C++, what should I do?