xref: /aosp_15_r20/external/pytorch/torch/csrc/cuda/shared/cusparselt.cpp (revision da0073e96a02ea20f0ac840b70461e3646d07c45)
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