{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/sparsetir-composable-abstractions-for-sparse","title":"SparseTIR: Composable Abstractions for Sparse Compilation in Deep Learning","arxiv_id":"2207.04606","date":"2022-07-11","proceeding":null,"authors":["Zihao Ye","Ruihang Lai","Junru Shao","Tianqi Chen","Luis Ceze"],"abstract":"Sparse tensors are rapidly becoming critical components of modern deep learning workloads. However, developing high-performance sparse operators can be difficult and tedious, and existing vendor libraries cannot satisfy the escalating demands from new operators. Sparse tensor compilers simplify the development of operators, but efficient sparse compilation for deep learning remains challenging because a single sparse format cannot maximize hardware efficiency, and single-shot compilers cannot keep up with latest hardware and system advances. In this paper, we observe that the key to addressing both these challenges is to leverage composable formats and composable transformations. We propose SparseTIR, a sparse tensor compilation abstraction that offers composable formats and composable transformations for deep learning workloads. SparseTIR constructs a search space over these composable components for performance tuning. With these improvements, SparseTIR obtains consistent performance speedups vs vendor libraries on GPUs for single operators: 1.20-2.34x for GNN operators, 1.05-2.98x for sparse attention operators, and 0.56-7.45x for sparse convolution operators. SparseTIR also accelerates end-to-end GNNs by 1.08-1.52x for GraphSAGE training, and 4.20-40.18x for RGCN inference.","url_abs":"https://arxiv.org/abs/2207.04606v4","url_pdf":"https://arxiv.org/pdf/2207.04606v4.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"sparsetir-composable-abstractions-for-sparse","repo_url":"https://github.com/uwsampl/sparsetir","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":null},{"paper_slug":"sparsetir-composable-abstractions-for-sparse","repo_url":"https://github.com/uwsampl/sparsetir-artifact","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"deep-learning","task_name":"Deep Learning"}],"methods":[{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"attention-dropout","method_name":"Attention Dropout"},{"method_slug":"convolution","method_name":"Convolution"},{"method_slug":"cosine-annealing","method_name":"Cosine Annealing"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"graphsage","method_name":"GraphSAGE"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"linear-warmup-with-cosine-annealing","method_name":"Linear Warmup With Cosine Annealing"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"rgcn","method_name":"RGCN"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"sparse-transformer","method_name":"Sparse Transformer"},{"method_slug":"weight-decay","method_name":"Weight Decay"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2207.04606","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2207.04606"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/uwsampl/sparsetir","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/uwsampl/sparsetir-artifact","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":1,"ran_violates":2,"ran_honours":1,"unverified":2},"by_repo_kind":{"official":{"samples":6,"ran":4,"repositories":2}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"a203c9547e2b44c6","entry":"convert_indptr_to_mid_array","repo":"uwsampl/sparsetir","repo_kind":"official","path":"examples/rgms/rgcn/bench_rgcn_composable.py","file_url":"https://github.com/uwsampl/sparsetir/blob/HEAD/examples/rgms/rgcn/bench_rgcn_composable.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"a203c9547e2b44c6"}},{"code_sha256_prefix":"0127dc65e233ffc2","entry":"csf_to_ell3d_inv_idx_map","repo":"uwsampl/sparsetir","repo_kind":"official","path":"examples/rgms/rgcn/bench_rgcn_composable.py","file_url":"https://github.com/uwsampl/sparsetir/blob/HEAD/examples/rgms/rgcn/bench_rgcn_composable.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0127dc65e233ffc2"}},{"code_sha256_prefix":"cfa9a94ddfedfe25","entry":"csr2ell_index_map","repo":"uwsampl/sparsetir","repo_kind":"official","path":"examples/spmm/bench_spmm.py","file_url":"https://github.com/uwsampl/sparsetir/blob/HEAD/examples/spmm/bench_spmm.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"cfa9a94ddfedfe25"}},{"code_sha256_prefix":"94854cfdac3baff0","entry":"csr2ell_inv_index_map","repo":"uwsampl/sparsetir","repo_kind":"official","path":"examples/spmm/bench_spmm.py","file_url":"https://github.com/uwsampl/sparsetir/blob/HEAD/examples/spmm/bench_spmm.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"94854cfdac3baff0"}},{"code_sha256_prefix":"17a5e59ed6fbf040","entry":"parse_mma_shape","repo":"uwsampl/sparsetir-artifact","repo_kind":"official","path":"pruned-bert/unstructured-transposed-single-op.py","file_url":"https://github.com/uwsampl/sparsetir-artifact/blob/HEAD/pruned-bert/unstructured-transposed-single-op.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"17a5e59ed6fbf040"}},{"code_sha256_prefix":"a63b4fca51872597","entry":"train","repo":"uwsampl/sparsetir-artifact","repo_kind":"official","path":"e2e/sage_dgl.py","file_url":"https://github.com/uwsampl/sparsetir-artifact/blob/HEAD/e2e/sage_dgl.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a63b4fca51872597"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}