SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2207.04606 · 2022

SparseTIR: Composable Abstractions for Sparse Compilation in Deep Learning

arXiv · PDF · Open in the Atlas

Code that ran

6 of 6 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 2 violated it and 2 have no contract verdict; 1 failure of our instrument; 0 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2207.04606.json · badge: /api/ran/2207.04606.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
uwsampl/sparsetir canonical (classifier label)
classifier basis: classifier_2025
4 ran · 0 no recorded run
uwsampl/sparsetir-artifact canonical (classifier label)
classifier basis not recorded on the link
2 ran · 0 no recorded run
FunctionStatusWhere it lives
convert_indptr_to_mid_array Ran
ran; our contract draft was wrong, not the code
uwsampl/sparsetir/examples/rgms/rgcn/bench_rgcn_composable.py
code served (permissive licence) · get_code("a203c9547e2b44c6")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 1, dtype family int, shape (7,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# The function expects indptr to have a .numpy() method,
# so it should be a torch tensor
indptr = torch.tensor([0, 2, 5, 7], dtype=torch.int64)

ARGS = {
    "indptr": indptr
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family int, shape (7,) — shape (7,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
csf_to_ell3d_inv_idx_map Ran
ran, violated the contract we drafted
uwsampl/sparsetir/examples/rgms/rgcn/bench_rgcn_composable.py
code served (permissive licence) · get_code("0127dc65e233ffc2")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 2, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Analyzing the function:
# def csf_to_ell3d_inv_idx_map(r, io, ii, j):
#     return (r, ii, j)
# 
# The function takes 4 parameters and returns a tuple of 3 of them (r, ii, j).
# It doesn't actually use 'io' in the return, and doesn't call any methods on the inputs.
# These appear to be indices or array-like objects based on naming convention.

# Create simple tensor arguments for indices
r = torch.tensor([0, 1, 2, 3], dtype=torch.long)
io = torch.tensor([1, 2, 3, 4], dtype=torch.long)
ii = torch.tensor([5, 6, 7, 8], dtype=torch.long)
j = torch.tensor([9, 10, 11, 12], dtype=torch.long)

ARGS = {
    "r": r,
    "io": io,
    "ii": ii,
    "j": j,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 2, dtype family int — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
csr2ell_index_map Ran
ran, honoured the contract we drafted
uwsampl/sparsetir/examples/spmm/bench_spmm.py
code served (permissive licence) · get_code("cfa9a94ddfedfe25")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

i = 0
j = 1

ARGS = {
    "i": i,
    "j": j,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family int — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
csr2ell_inv_index_map Ran
ran, violated the contract we drafted
uwsampl/sparsetir/examples/spmm/bench_spmm.py
code served (permissive licence) · get_code("94854cfdac3baff0")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 2, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# The function csr2ell_inv_index_map takes three parameters: o, i, j
# Looking at the function body, it simply returns (i, j)
# The parameters appear to be indices or arrays used in sparse matrix conversion
# o is likely an offset array, i and j are likely index arrays

# Create small index arrays for CSR/ELL sparse matrix format conversion
o = np.array([0, 2, 4], dtype=np.int32)  # offset array, 3 elements
i = np.array([0, 1, 2, 0, 1], dtype=np.int32)  # row indices, 5 elements
j = np.array([0, 1, 2, 1, 2], dtype=np.int32)  # column indices, 5 elements

ARGS = {
    "o": o,
    "i": i,
    "j": j
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 2, dtype family int — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
parse_mma_shape Ran
ran on a synthesized input
uwsampl/sparsetir-artifact/pruned-bert/unstructured-transposed-single-op.py
code served (permissive licence) · get_code("17a5e59ed6fbf040")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

# The function parse_mma_shape takes a string like "m16n8k4" and parses it
# to extract the three integer values for m, n, and k dimensions

ARGS = {
    "mma_shape_str": "m16n8k4"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family int — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
train Ran
ran on a synthesized input
uwsampl/sparsetir-artifact/e2e/sage_dgl.py
code served (permissive licence) · get_code("a63b4fca51872597")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F

torch.manual_seed(0)

# Build a small model
class SimpleGNNModel(nn.Module):
    def __init__(self, input_dim, hidden_dim, output_dim):
        super().__init__()
        self.linear1 = nn.Linear(input_dim, hidden_dim)
        self.linear2 = nn.Linear(hidden_dim, output_dim)
    
    def forward(self, g, feats):
        # Simple model that ignores graph structure for this test
        x = F.relu(self.linear1(feats))
        out = self.linear2(x)
        return out

# Create tiny tensors
batch_size = 2
num_nodes = 5
input_dim = 4
output_dim = 3

feats = torch.randn(num_nodes, input_dim)
y_true_multiclass = torch.randint(0, output_dim, (num_nodes,))
y_true_multilabel = torch.randint(0, 2, (num_nodes, output_dim)).float()

# Create train indices
train_idx = torch.tensor([0, 2])

# Create a simple graph object (mock)
class MockGraph:
    pass

g = MockGraph()

# Create model
model = SimpleGNNModel(input_dim=input_dim, hidden_dim=4, output_dim=output_dim)

# Create optimizer
optimizer = optim.Adam(model.parameters(), lr=0.01)

# Test with both dataset types
# For 'ppi' dataset (binary cross entropy path)
ARGS_ppi = {
    'dataset': 'ppi',
    'model': model,
    'g': g,
    'feats': feats,
    'y_true': y_true_multilabel,
    'train_idx': train_idx,
    'optimizer': optimizer
}

# For other dataset (nll_loss path)
ARGS_other = {
    'dataset': 'citation',
    'model': model,
    'g': g,
    'feats': feats,
    'y_true': y_true_multiclass,
    'train_idx': train_idx,
    'optimizer': optimizer
}

# Use the ppi version as primary
ARGS = ARGS_ppi
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 6 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

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.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2207.04606")
get_code_for_paper("2207.04606")
have("2207.04606")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2207.04606.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2207.04606.svg)](https://syntology.ai/paper/2207.04606)

Connect an agent — have() is free.