pytorch/torch
Jesse Cai 255cd75a97 [sparse] Add cuSPARSELt as a backend (#128534)
Summary:

This PR adds in cuSPARSELt as a backend to PyTorch.

It is now possible to see if cuSPARSELt is available and the version if
it is with
```
torch.backends.cusparselt.is_available()
torch.backends.cusparselt.version()
```

Test Plan:
```
python test/test_sparse_semi_structured.py -k test_cusparselt_backend
```

Reviewers:

Subscribers:

Tasks:

Tags:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/128534
Approved by: https://github.com/cpuhrsch, https://github.com/eqy, https://github.com/syed-ahmed
2024-08-21 22:06:07 +00:00
..
_awaits [BE][Easy] enable ruff rule PIE790: unnecessary pass statement (#133200) 2024-08-15 15:50:19 +00:00
_C [sparse] Add cuSPARSELt as a backend (#128534) 2024-08-21 22:06:07 +00:00
_C_flatbuffer
_custom_op Tighten torch.library.infer_schema input types (#130705) 2024-07-29 16:01:19 +00:00
_decomp Register nll_loss2d decompositions for core aten (#133534) 2024-08-19 18:26:48 +00:00
_dispatch [BE][Easy][15/19] enforce style for empty lines in import segments in torch/_d*/ (#129767) 2024-07-31 21:18:11 +00:00
_dynamo Revert "[hop] ban creating hop by directly instantiating HigherOrderOperator. (#133645)" 2024-08-21 19:33:14 +00:00
_export Revert "[hop] ban creating hop by directly instantiating HigherOrderOperator. (#133645)" 2024-08-21 19:33:14 +00:00
_functorch [partitioner] Fix must_be_in_backward corner cases (#134002) 2024-08-21 15:58:49 +00:00
_higher_order_ops Revert "[hop] ban creating hop by directly instantiating HigherOrderOperator. (#133645)" 2024-08-21 19:33:14 +00:00
_inductor [PT2] Add a pass to convert stack to unsqueeze cat (#133966) 2024-08-21 17:31:26 +00:00
_lazy Add None return type to init (#132335) 2024-08-01 15:26:45 +00:00
_library [HOP] support generating schema for hop (#133521) 2024-08-21 17:34:21 +00:00
_logging Add ChromiumEventLogger, log FXGraphCache and AOTAutogradCache (#132864) 2024-08-10 01:15:53 +00:00
_numpy [test/torch_np] Fix usages of deprecated NumPy 2.0 APIs in numpy_tests (#131909) 2024-08-05 16:21:08 +00:00
_prims Revert "[hop] ban creating hop by directly instantiating HigherOrderOperator. (#133645)" 2024-08-21 19:33:14 +00:00
_prims_common [BE][Easy][14/19] enforce style for empty lines in import segments in torch/_[a-c]*/ and torch/_[e-h]*/ and torch/_[j-z]*/ (#129765) 2024-07-31 10:42:50 +00:00
_refs Remove early exit in constant_pad_nd for export (#132679) 2024-08-20 00:07:41 +00:00
_strobelight [BE][Easy][14/19] enforce style for empty lines in import segments in torch/_[a-c]*/ and torch/_[e-h]*/ and torch/_[j-z]*/ (#129765) 2024-07-31 10:42:50 +00:00
_subclasses Revert "[BE]: Update Typeguard to TypeIs for better type inference (#133814)" 2024-08-21 16:13:34 +00:00
_vendor
amp Revert "[MPS] Add support for autocast in MPS (#99272)" 2024-08-05 19:59:04 +00:00
ao [export] training ir migration, fix export_rle_model (#133937) 2024-08-20 15:35:25 +00:00
autograd [BE][Easy] enable ruff rule PIE790: unnecessary pass statement (#133200) 2024-08-15 15:50:19 +00:00
backends [sparse] Add cuSPARSELt as a backend (#128534) 2024-08-21 22:06:07 +00:00
compiler [RFC][dynamo] add decorator to register polyfill for unsupported C++ function to avoid graph break (#133712) 2024-08-21 06:36:41 +00:00
contrib
cpu [BE][Easy][17/19] enforce style for empty lines in import segments in torch/[a-c]*/ and torch/[e-n]*/ (#129769) 2024-08-04 10:24:09 +00:00
csrc [sparse] Add cuSPARSELt as a backend (#128534) 2024-08-21 22:06:07 +00:00
cuda Fix partially initialized module error (#134019) 2024-08-20 22:20:02 +00:00
distributed Fix DDPLoadBalancingPlanner docstring (#134044) 2024-08-21 21:28:22 +00:00
distributions Add correct typing annotations to rsample() for all distributions (#133516) 2024-08-18 20:31:54 +00:00
export [export] Implement common_getitem_elimination pass. (#133618) 2024-08-21 16:48:24 +00:00
fft
func
futures
fx [Doc] Fix typo in torch/fx/passes/README.md (#134078) 2024-08-21 18:35:50 +00:00
jit [BE]: Update ruff to 0.6.0 (#133609) 2024-08-16 14:11:01 +00:00
legacy
lib
linalg fix a typo in the householder_product docs (#124279) 2024-08-15 09:34:17 +00:00
masked Revert "[BE]: Update Typeguard to TypeIs for better type inference (#133814)" 2024-08-21 16:13:34 +00:00
monitor [pytorch][counters] Pybind for WaitCounter (#132357) 2024-08-02 16:08:10 +00:00
mps [BE][Easy][17/19] enforce style for empty lines in import segments in torch/[a-c]*/ and torch/[e-n]*/ (#129769) 2024-08-04 10:24:09 +00:00
mtia [BE][Easy] enable ruff rule PIE790: unnecessary pass statement (#133200) 2024-08-15 15:50:19 +00:00
multiprocessing [BE][Easy][17/19] enforce style for empty lines in import segments in torch/[a-c]*/ and torch/[e-n]*/ (#129769) 2024-08-04 10:24:09 +00:00
nested Implement 2D version of masked_select for nestedtensors (#133889) 2024-08-20 21:46:32 +00:00
nn Revert "[BE]: Update Typeguard to TypeIs for better type inference (#133814)" 2024-08-21 16:13:34 +00:00
onnx [ONNX] Opt into ruff fmt (#134120) 2024-08-21 21:43:55 +00:00
optim Make optim.swa.util content accessible from the torch.optim doc (#133393) 2024-08-21 00:43:46 +00:00
package [BE][Easy] enable ruff rule PIE790: unnecessary pass statement (#133200) 2024-08-15 15:50:19 +00:00
profiler [Profiler/CPU] Add API for Dynamic Activity Toggling [3/n] (#133353) 2024-08-16 16:36:57 +00:00
quantization [BE][Easy][19/19] enforce style for empty lines in import segments in torch/[o-z]*/ (#129771) 2024-08-01 17:07:14 +00:00
signal Revert "[BE] typing for decorators - signal/windows/windows (#131582)" 2024-07-28 03:29:31 +00:00
sparse Add int8 support to bsr_dense_addmm and bsr_dense_mm Triton kernels (#133855) 2024-08-21 20:44:40 +00:00
special
testing [Inductor] Move GPU_TYPE(The runtime avaliable gpu type, cuda or xpu) from (#132740) 2024-08-21 11:18:00 +00:00
utils Revert "[BE]: Update Typeguard to TypeIs for better type inference (#133814)" 2024-08-21 16:13:34 +00:00
xpu [BE][Easy][19/19] enforce style for empty lines in import segments in torch/[o-z]*/ (#129771) 2024-08-01 17:07:14 +00:00
__config__.py
__future__.py
__init__.py Revert "[BE]: Update Typeguard to TypeIs for better type inference (#133814)" 2024-08-21 16:13:34 +00:00
_appdirs.py [BE][Easy][14/19] enforce style for empty lines in import segments in torch/_[a-c]*/ and torch/_[e-h]*/ and torch/_[j-z]*/ (#129765) 2024-07-31 10:42:50 +00:00
_classes.py Add None return type to init (#132335) 2024-08-01 15:26:45 +00:00
_compile.py [BE] Format uncategorized Python files with ruff format (#132576) 2024-08-04 17:13:31 +00:00
_custom_ops.py [BE][Easy][14/19] enforce style for empty lines in import segments in torch/_[a-c]*/ and torch/_[e-h]*/ and torch/_[j-z]*/ (#129765) 2024-07-31 10:42:50 +00:00
_deploy.py
_guards.py Revert "[dynamo][reland][inline-inbuilt-nn-modules] Mark attributes of nn mod… (#133714)" 2024-08-21 14:21:06 +00:00
_jit_internal.py [BE] Format uncategorized Python files with ruff format (#132576) 2024-08-04 17:13:31 +00:00
_linalg_utils.py [BE] Format uncategorized Python files with ruff format (#132576) 2024-08-04 17:13:31 +00:00
_lobpcg.py [BE][Easy] enable ruff rule PIE790: unnecessary pass statement (#133200) 2024-08-15 15:50:19 +00:00
_lowrank.py [BE] Format uncategorized Python files with ruff format (#132576) 2024-08-04 17:13:31 +00:00
_meta_registrations.py Added meta registration for _fused_adamw_ (#133728) 2024-08-17 00:28:31 +00:00
_namedtensor_internals.py [BE][Easy][14/19] enforce style for empty lines in import segments in torch/_[a-c]*/ and torch/_[e-h]*/ and torch/_[j-z]*/ (#129765) 2024-07-31 10:42:50 +00:00
_ops.py Revert "[hop] ban creating hop by directly instantiating HigherOrderOperator. (#133645)" 2024-08-21 19:33:14 +00:00
_python_dispatcher.py Add None return type to init (#132335) 2024-08-01 15:26:45 +00:00
_size_docs.py
_sources.py
_storage_docs.py [BE] Format uncategorized Python files with ruff format (#132576) 2024-08-04 17:13:31 +00:00
_streambase.py
_tensor_docs.py [BE] Format uncategorized Python files with ruff format (#132576) 2024-08-04 17:13:31 +00:00
_tensor_str.py [BE] Format uncategorized Python files with ruff format (#132576) 2024-08-04 17:13:31 +00:00
_tensor.py [BE] Format uncategorized Python files with ruff format (#132576) 2024-08-04 17:13:31 +00:00
_torch_docs.py [docs] improve torch.stack example code to be reproducible (#133857) 2024-08-21 14:07:02 +00:00
_utils_internal.py remove StrobelightCompileTimeProfiler.profile_compile_time from stacktrace when strobelight profiling not enabled (#133831) 2024-08-19 09:14:52 +00:00
_utils.py Revert "Deprecate torch._utils.is_compiling() and torch._dynamo.external_utils.is_compiling() (#127690)" 2024-08-07 00:05:20 +00:00
_VF.py [BE] Format uncategorized Python files with ruff format (#132576) 2024-08-04 17:13:31 +00:00
_vmap_internals.py
_weights_only_unpickler.py Fix failures when default is flipped for weights_only (#127627) 2024-08-16 00:22:43 +00:00
abi-check.cpp
CMakeLists.txt [sparse] Add cuSPARSELt as a backend (#128534) 2024-08-21 22:06:07 +00:00
custom_class_detail.h Enable clang-tidy coverage on torch/*.h (#133422) 2024-08-15 18:52:08 +00:00
custom_class.h Enable clang-tidy coverage on torch/*.h (#133422) 2024-08-15 18:52:08 +00:00
extension.h
functional.py [BE] Format uncategorized Python files with ruff format (#132576) 2024-08-04 17:13:31 +00:00
hub.py [BE] Format uncategorized Python files with ruff format (#132576) 2024-08-04 17:13:31 +00:00
library.h Enable clang-tidy coverage on torch/*.h (#133422) 2024-08-15 18:52:08 +00:00
library.py [custom_ops] torch.library.{custom_op, register_kernel} disable Dynamo (#133125) 2024-08-12 18:29:18 +00:00
overrides.py [BE] Format uncategorized Python files with ruff format (#132576) 2024-08-04 17:13:31 +00:00
py.typed
quasirandom.py [BE] Format uncategorized Python files with ruff format (#132576) 2024-08-04 17:13:31 +00:00
random.py
README.txt
return_types.py
script.h
serialization.py Revert "[BE]: Update Typeguard to TypeIs for better type inference (#133814)" 2024-08-21 16:13:34 +00:00
storage.py Fix public API tests (#131386) 2024-07-30 18:42:54 +00:00
torch_version.py Add mypy typing to torch_version.py (#131447) 2024-07-23 17:31:07 +00:00
types.py FakeTensor cache SymInt support (#127596) 2024-07-21 19:26:38 +00:00
version.py.tpl

Note [TH abstraction violation]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

TH/THC provide some hpp headers, which are proper C++ headers rather than
C headers.  These headers serve double duty as *internal implementation
detail* headers, whose contents should largely not be used by external
clients.

Ideally, we would not install these headers at all; instead, you should
use public functions (in headers like `THTensor.h`, NOT `THTensor.hpp`)
to manipulate these structs.  However, there are a few places
in torch/csrc where we violate this abstraction.  They are marked with
a pointer to this note.  Each of those sites will have to be refactored
when we refactor the guts of THTensor and related structures.