SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · aaai_17462 · AAAI · 2021

OpEvo: An Evolutionary Method for Tensor Operator Optimization

Mao Yang, Xiaotian Gao, Wei Cui, Lintao Zhang

Open in the Atlas

Code that ran

7 of 12 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; 0 honoured the contract we drafted, 0 violated it and 7 have no contract verdict; 0 failures of our instrument; 5 no recorded run), measured 2026-11-23; 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/aaai_17462.json · badge: /api/ran/aaai_17462.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
microsoft/nni canonical (classifier label)
classifier basis: census
7 ran · 1 no recorded run
apache/incubator-tvm canonical (classifier label)
classifier basis: census
0 ran · 4 no recorded run
FunctionStatusWhere it lives
choice Ran
ran on a synthesized input
microsoft/nni/nni/parameter_expressions.py
code served (permissive licence) · get_code("eb782eb277ece3dd")
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 int64, ndim 0, dtype family int, 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 numpy as np

# Create a RandomState object
random_state = np.random.RandomState(seed=42)

# Create valid options for choice
# options can be a 1-D array-like or int
options = np.array([1, 2, 3, 4, 5])

ARGS = {
    "options": options,
    "random_state": random_state,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int64, ndim 0, dtype family int, 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
extract_scalar_history Ran
ran on a synthesized input
microsoft/nni/nni/utils.py
code served (permissive licence) · get_code("501550308a1b0937")
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 list, ndim 1, dtype family float; 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

# Define ARGS for extract_scalar_history
# The function takes:
# - trial_history: list of intermediate results
# - scalar_key: str (optional, defaults to 'default')

# trial_history should be a list where each element can be:
# - a float or int
# - a dict with the scalar_key

trial_history = [
    0.5,
    1.2,
    {'default': 2.3},
    3.1,
    {'default': 4.7}
]

ARGS = {
    'trial_history': trial_history,
    'scalar_key': 'default'
}
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 list, ndim 1, dtype family float — a list 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
extract_scalar_reward Ran
ran on a synthesized input
microsoft/nni/nni/utils.py
code served (permissive licence) · get_code("bdf520dc3f74ec0b")
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 numpy as np

torch.manual_seed(0)

# Test case 1: scalar float value
test_value_float = 0.95

# Test case 2: scalar int value
test_value_int = 42

# Test case 3: dict with 'default' key containing float
test_value_dict_default_float = {'default': 0.87, 'other_key': 'ignored'}

# Test case 4: dict with 'default' key containing int
test_value_dict_default_int = {'default': 100, 'other_key': 'ignored'}

# Test case 5: dict with custom scalar_key
test_value_dict_custom = {'custom_metric': 0.75, 'other_key': 'ignored'}

# Main ARGS dict - testing with a float value and default scalar_key
ARGS = {
    'value': 0.95,
    'scalar_key': 'default'
}
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 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
randint Ran
ran on a synthesized input
microsoft/nni/nni/parameter_expressions.py
code served (permissive licence) · get_code("3831fadbd2206cbc")
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 int, ndim 0, dtype family int, 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 numpy as np

random_state = np.random.RandomState(seed=42)

ARGS = {
    "lower": 0,
    "upper": 100,
    "random_state": random_state
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, 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
split_index Ran
ran on a synthesized input
microsoft/nni/nni/utils.py
code served (permissive licence) · get_code("84a9562e90644501")
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 dict. The image it ran in was not recorded. If your copy returns the same type 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.

class NodeType:
    """Node Type class
    """
    ROOT = 'root'
    TYPE = '_type'
    VALUE = '_value'
    INDEX = '_index'
    NAME = '_name'

def split_index(params):
    """
    Delete index infromation from params
    """
    if isinstance(params, dict):
        if NodeType.INDEX in params.keys():
            return split_index(params[NodeType.VALUE])
        result = {}
        for key in params:
            result[key] = split_index(params[key])
        return result
    else:
        return params

# Test case 1: dict with INDEX key should extract VALUE
test_params_1 = {
    NodeType.INDEX: 42,
    NodeType.VALUE: {'nested_key': 'nested_value'}
}

# Test case 2: nested dict without INDEX keys
test_params_2 = {
    'key1': 'value1',
    'key2': {
        'nested_key': 'nested_value'
    },
    'key3': [1, 2, 3]
}

# Test case 3: dict with INDEX at multiple levels
test_params_3 = {
    NodeType.INDEX: 10,
    NodeType.VALUE: {
        'inner_key': 'inner_value',
        'inner_dict': {
            NodeType.INDEX: 20,
            NodeType.VALUE: 'final_value'
        }
    }
}

# Test case 4: non-dict primitive
test_params_4 = 'simple_string'

ARGS = {
    'params': test_params_1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
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
test Ran
ran on a synthesized input
microsoft/nni/nni_assets/hello_hpo/model.py
code served (permissive licence) · get_code("d1cf9444cdb9ff2b")
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. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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
from torch import nn

torch.manual_seed(0)

# Create a minimal model that satisfies the function's usage
# The function calls: model.eval(), model(X), and uses argmax(1)
model = nn.Sequential(
    nn.Flatten(),
    nn.Linear(16, 10),  # Input: 4x4 flattened to 16, output: 10 classes
    nn.ReLU()
)

# Create a minimal dataloader (list of (X, y) tuples)
# X should be (batch_size, 1, 4, 4) to flatten to 16
# y should be class indices (0-9)
batch_size = 2
num_batches = 2
dataloader = []
for _ in range(num_batches):
    X = torch.randn(batch_size, 1, 4, 4)
    y = torch.randint(0, 10, (batch_size,))
    dataloader.append((X, y))

# Add len and dataset attributes to dataloader
class SimpleDataLoader(list):
    def __init__(self, data):
        super().__init__(data)
        self.dataset = SimpleDataset(sum(len(y) for _, y in data))

class SimpleDataset:
    def __init__(self, size):
        self.size = size
    
    def __len__(self):
        return self.size

dataloader = SimpleDataLoader(dataloader)

# Create a loss function (not used in test, but good to have)
loss_fn = nn.CrossEntropyLoss()

ARGS = {
    'dataloader': dataloader,
    'model': model,
    'loss_fn': loss_fn
}
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
uniform Ran
ran on a synthesized input
microsoft/nni/nni/parameter_expressions.py
code served (permissive licence) · get_code("379270ae1beb4a71")
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 numpy as np

# Create a RandomState object
random_state = np.random.RandomState(seed=42)

# Define arguments for the uniform function
ARGS = {
    'low': 0.0,
    'high': 10.0,
    'random_state': random_state
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
enabled Not yet run
unverified (harvested, no recorded run)
apache/incubator-tvm/python/tvm/runtime/module.py
code served (permissive licence) · get_code("82eabf990623d7c0")
How it ran

no invocation recorded.

get_current_parameter Not yet run
unverified (harvested, no recorded run)
microsoft/nni/nni/trial.py
code served (permissive licence) · get_code("74fcff4ccee731b2")
How it ran

no invocation recorded.

is_loaded Not yet run
unverified (harvested, no recorded run)
apache/incubator-tvm/python/tvm/backend/loader.py
code served (permissive licence) · get_code("c28232f402eccf56")
How it ran

no invocation recorded.

load Not yet run
unverified (harvested, no recorded run)
apache/incubator-tvm/python/tvm/backend/loader.py
code served (permissive licence) · get_code("9b113cb0b7f42254")
How it ran

no invocation recorded.

load_static_library Not yet run
unverified (harvested, no recorded run)
apache/incubator-tvm/python/tvm/runtime/module.py
code served (permissive licence) · get_code("0ae10ec0399c40ac")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 later) and 11 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.

FunctionAlso present inEarliest-datedOthers named
load_static_library 1 other paper
1 later
2506.01374 (2025-06)
REASONING COMPILER: LLM-Guided Optimizations for Efficient Model Serving

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-23.

Repositories linked to this paper

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

Abstract

Training and inference efficiency of deep neural networks highly rely on the performance of tensor operators on hardware platforms. Manually optimizing tensor operators has limitations in terms of supporting new operators or hardware platforms. Therefore, automatically optimizing device code configurations of tensor operators is getting increasingly attractive. However, current methods for tensor operator optimization usually suffer from poor sample-efficiency due to the combinatorial search space. In this work, we propose a novel evolutionary method, OpEvo, which efficiently explores the search spaces of tensor operators by introducing a topology-aware mutation operation based on q-random walk to leverage the topological structures over the search spaces. Our comprehensive experiment results show that compared with state-of-the-art (SOTA) methods OpEvo can find the best configuration with the lowest variance and least efforts in the number of trials and wall-clock time. All code of this work is available online.

For agents

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

get_harvested_code_for_paper("aaai_17462")
get_code_for_paper("aaai_17462")
have("aaai_17462")

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

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

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

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

Connect an agent — have() is free.