• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #include <torch/csrc/utils/pybind.h>
2 
3 #ifdef USE_CUSPARSELT
4 #include <cusparseLt.h>
5 
6 namespace {
7 
getVersionInt()8 size_t getVersionInt() {
9   return CUSPARSELT_VERSION;
10 }
11 
12 } // namespace
13 
14 namespace torch::cuda::shared {
15 
initCusparseltBindings(PyObject * module)16 void initCusparseltBindings(PyObject* module) {
17   auto m = py::handle(module).cast<py::module>();
18   auto cusparselt = m.def_submodule("_cusparselt", "libcusparselt.so bindings");
19   cusparselt.def("getVersionInt", getVersionInt);
20 }
21 
22 } // namespace torch::cuda::shared
23 #endif
24