markat-compiler 0.3.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. markat/__init__.py +123 -0
  2. markat/backends/__init__.py +8 -0
  3. markat/backends/profiles.py +350 -0
  4. markat/benchmark/__init__.py +21 -0
  5. markat/benchmark/runner.py +266 -0
  6. markat/calibration/__init__.py +8 -0
  7. markat/calibration/profiler.py +317 -0
  8. markat/cli.py +524 -0
  9. markat/config.py +194 -0
  10. markat/cost_model.py +461 -0
  11. markat/diagnostics/__init__.py +10 -0
  12. markat/diagnostics/bisect.py +242 -0
  13. markat/diagnostics/provenance.py +312 -0
  14. markat/egraph/__init__.py +17 -0
  15. markat/egraph/core.py +301 -0
  16. markat/egraph/pass_runner.py +788 -0
  17. markat/egraph/rules.py +634 -0
  18. markat/exporter/__init__.py +18 -0
  19. markat/exporter/dtype_gating.py +106 -0
  20. markat/exporter/onnx_export.py +992 -0
  21. markat/frontend/__init__.py +18 -0
  22. markat/frontend/ingest.py +325 -0
  23. markat/frontend/metadata.py +802 -0
  24. markat/frontend/safetensors_store.py +473 -0
  25. markat/ir/__init__.py +26 -0
  26. markat/ir/canonicalize.py +976 -0
  27. markat/ir/ops_registry.py +541 -0
  28. markat/ir/regions.py +475 -0
  29. markat/ir/weight_store.py +136 -0
  30. markat/passes/__init__.py +16 -0
  31. markat/passes/folding.py +735 -0
  32. markat/passes/fusion.py +219 -0
  33. markat/passes/identities.py +319 -0
  34. markat/quantization/__init__.py +36 -0
  35. markat/quantization/ops.py +931 -0
  36. markat/quantization/planner.py +433 -0
  37. markat/quantization/smoothing.py +292 -0
  38. markat/report.py +159 -0
  39. markat/robotics/__init__.py +18 -0
  40. markat/robotics/loop_hoister.py +428 -0
  41. markat/robotics/multistream.py +482 -0
  42. markat/simplifier.py +372 -0
  43. markat/structure/__init__.py +24 -0
  44. markat/structure/mask_analyzer.py +222 -0
  45. markat/structure/ops.py +408 -0
  46. markat/structure/specializer.py +618 -0
  47. markat_compiler-0.3.0.dist-info/METADATA +447 -0
  48. markat_compiler-0.3.0.dist-info/RECORD +53 -0
  49. markat_compiler-0.3.0.dist-info/WHEEL +5 -0
  50. markat_compiler-0.3.0.dist-info/entry_points.txt +2 -0
  51. markat_compiler-0.3.0.dist-info/licenses/LICENSE +201 -0
  52. markat_compiler-0.3.0.dist-info/licenses/NOTICE +4 -0
  53. markat_compiler-0.3.0.dist-info/top_level.txt +1 -0
markat/__init__.py ADDED
@@ -0,0 +1,123 @@
1
+ # Copyright 2026 Athrva Pandhare
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ """Markat v0.2: Algebraic, structural, Robotics/AV, and target-aware PyTorch-to-ONNX/QDQ compiler."""
5
+
6
+ from markat.backends.profiles import QDQDialect, TargetBackendProfile
7
+ from markat.benchmark import (
8
+ BenchmarkResult,
9
+ benchmark_onnx_artifact,
10
+ benchmark_simplified,
11
+ )
12
+ from markat.config import (
13
+ AlgebraicConfig,
14
+ HardwareProfile,
15
+ QuantScheme,
16
+ QuantizationConfig,
17
+ RoboticsConfig,
18
+ SimplificationConfig,
19
+ StructuralConfig,
20
+ )
21
+ from markat.cost_model import RooflineCostModel
22
+ from markat.diagnostics.bisect import BisectResult, BisectSelection, bisect_regression
23
+ from markat.diagnostics.provenance import NodeLineage, RewriteRecord
24
+ from markat.exporter.onnx_export import (
25
+ MultiRateBundleReport,
26
+ ONNXExportReport,
27
+ export_hoisted_bundle,
28
+ export_onnx,
29
+ )
30
+ from markat.frontend.safetensors_store import (
31
+ ingest_from_safetensors,
32
+ materialize_from_safetensors,
33
+ )
34
+ from markat.quantization.ops import (
35
+ FP8E4M3QDQLinear,
36
+ HalfPrecisionConv2d,
37
+ HalfPrecisionLinear,
38
+ INT4GroupwiseLinear,
39
+ INT8DynamicLinear,
40
+ INT8WeightOnlyLinear,
41
+ StaticINT8QDQConv2d,
42
+ StaticINT8QDQLinear,
43
+ )
44
+ from markat.quantization.smoothing import (
45
+ apply_hadamard_lowrank_smoothing,
46
+ apply_smoothquant_migration,
47
+ build_block_hadamard,
48
+ )
49
+ from markat.report import (
50
+ FidelityMetrics,
51
+ GraphStats,
52
+ LayerQuantDecision,
53
+ RewriteEvent,
54
+ SimplificationReport,
55
+ )
56
+ from markat.robotics.loop_hoister import (
57
+ HoistedDiffusionRollout,
58
+ LoopHoistReport,
59
+ hoist_loop_invariant_conditioning,
60
+ )
61
+ from markat.robotics.multistream import vectorize_isomorphic_streams
62
+ from markat.simplifier import MarkatSimplifier, simplify
63
+ from markat.structure.ops import (
64
+ BlockDiagonalLinear,
65
+ BlockSparseAttention,
66
+ DecomposedFastAttention,
67
+ LowRankLinear,
68
+ )
69
+
70
+ __version__ = "0.3.0"
71
+
72
+ __all__ = [
73
+ "AlgebraicConfig",
74
+ "BenchmarkResult",
75
+ "BisectResult",
76
+ "BisectSelection",
77
+ "BlockDiagonalLinear",
78
+ "BlockSparseAttention",
79
+ "DecomposedFastAttention",
80
+ "FP8E4M3QDQLinear",
81
+ "FidelityMetrics",
82
+ "GraphStats",
83
+ "HalfPrecisionConv2d",
84
+ "HalfPrecisionLinear",
85
+ "HardwareProfile",
86
+ "HoistedDiffusionRollout",
87
+ "INT4GroupwiseLinear",
88
+ "INT8DynamicLinear",
89
+ "INT8WeightOnlyLinear",
90
+ "LayerQuantDecision",
91
+ "LoopHoistReport",
92
+ "LowRankLinear",
93
+ "MarkatSimplifier",
94
+ "NodeLineage",
95
+ "MultiRateBundleReport",
96
+ "ONNXExportReport",
97
+ "QDQDialect",
98
+ "QuantScheme",
99
+ "QuantizationConfig",
100
+ "RewriteEvent",
101
+ "RewriteRecord",
102
+ "RoboticsConfig",
103
+ "RooflineCostModel",
104
+ "SimplificationConfig",
105
+ "SimplificationReport",
106
+ "StaticINT8QDQConv2d",
107
+ "StaticINT8QDQLinear",
108
+ "StructuralConfig",
109
+ "TargetBackendProfile",
110
+ "apply_hadamard_lowrank_smoothing",
111
+ "apply_smoothquant_migration",
112
+ "benchmark_onnx_artifact",
113
+ "benchmark_simplified",
114
+ "bisect_regression",
115
+ "build_block_hadamard",
116
+ "export_hoisted_bundle",
117
+ "export_onnx",
118
+ "hoist_loop_invariant_conditioning",
119
+ "ingest_from_safetensors",
120
+ "materialize_from_safetensors",
121
+ "simplify",
122
+ "vectorize_isomorphic_streams",
123
+ ]
@@ -0,0 +1,8 @@
1
+ # Copyright 2026 Athrva Pandhare
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ """Target hardware and Execution Provider (EP) profiles for backend-aware simplification."""
5
+
6
+ from markat.backends.profiles import QDQDialect, TargetBackendProfile, resolve_profile
7
+
8
+ __all__ = ["QDQDialect", "TargetBackendProfile", "resolve_profile"]
@@ -0,0 +1,350 @@
1
+ # Copyright 2026 Athrva Pandhare
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ """Target backend profiles governing QDQ schemas, tile alignment, FMHA guards, and EP legality."""
5
+
6
+ from __future__ import annotations
7
+
8
+ import copy
9
+ from dataclasses import dataclass, field
10
+ from enum import Enum
11
+ from typing import Literal
12
+
13
+ import torch
14
+
15
+ from markat.config import HardwareProfile, QuantScheme
16
+
17
+
18
+ class QDQDialect(str, Enum):
19
+ """ONNX QuantizeLinear / DequantizeLinear schema expected by downstream EPs."""
20
+
21
+ ORT_DYNAMIC_AND_STATIC = "ort_dynamic_and_static"
22
+ TRT_STATIC_SYMMETRIC_INT8 = "trt_static_symmetric_int8"
23
+ TRT_FP8_AND_INT8 = "trt_fp8_and_int8"
24
+ QNN_STATIC_ASYMMETRIC = "qnn_static_asymmetric"
25
+
26
+
27
+ # Core ONNX ops universally accelerated on GPU/NPU Execution Providers without CPU fallback.
28
+ # ``If`` is deliberately absent: QNN HTP does not support ONNX ``If`` and a
29
+ # shared default would let a conditional graph pass the strict single-partition
30
+ # audit while silently falling back to the CPU.
31
+ _STANDARD_ACCELERATOR_ONNX_OPS: frozenset[str] = frozenset(
32
+ {
33
+ "Add",
34
+ "Sub",
35
+ "Mul",
36
+ "Div",
37
+ "Neg",
38
+ "Sqrt",
39
+ "Pow",
40
+ "Exp",
41
+ "Log",
42
+ "Erf",
43
+ "Sin",
44
+ "Cos",
45
+ "Abs",
46
+ "Clip",
47
+ "Relu",
48
+ "Sigmoid",
49
+ "Tanh",
50
+ "Gelu",
51
+ "LeakyRelu",
52
+ "Softmax",
53
+ "MatMul",
54
+ "Gemm",
55
+ "Conv",
56
+ "ConvTranspose",
57
+ "BatchNormalization",
58
+ "LayerNormalization",
59
+ "SimplifiedLayerNormalization",
60
+ "InstanceNormalization",
61
+ "GroupNormalization",
62
+ "ReduceMean",
63
+ "ReduceSum",
64
+ "ReduceMax",
65
+ "Reshape",
66
+ "Transpose",
67
+ "Flatten",
68
+ "Squeeze",
69
+ "Unsqueeze",
70
+ "Concat",
71
+ "Split",
72
+ "Slice",
73
+ "Gather",
74
+ "Expand",
75
+ "Pad",
76
+ "Cast",
77
+ "Constant",
78
+ "ConstantOfShape",
79
+ "Shape",
80
+ "Where",
81
+ "Equal",
82
+ "Greater",
83
+ "Less",
84
+ "MaxPool",
85
+ "AveragePool",
86
+ "GlobalAveragePool",
87
+ "Resize",
88
+ "QuantizeLinear",
89
+ "DequantizeLinear",
90
+ "Attention",
91
+ "Identity",
92
+ }
93
+ )
94
+
95
+ # TensorRT and OpenVINO admit ONNX ``If``; QNN HTP keeps the base set above.
96
+ _STANDARD_ACCELERATOR_ONNX_OPS_WITH_IF: frozenset[str] = (
97
+ _STANDARD_ACCELERATOR_ONNX_OPS | {"If"}
98
+ )
99
+
100
+ # Strict NVDLA (Orin Deep Learning Accelerator) legal vision-stem subset
101
+ _NVDLA_LEGAL_ONNX_OPS: frozenset[str] = frozenset(
102
+ {
103
+ "Conv",
104
+ "ConvTranspose",
105
+ "BatchNormalization",
106
+ "Relu",
107
+ "Sigmoid",
108
+ "Tanh",
109
+ "LeakyRelu",
110
+ "Add",
111
+ "Mul",
112
+ "Sub",
113
+ "Div",
114
+ "Clip",
115
+ "MaxPool",
116
+ "AveragePool",
117
+ "GlobalAveragePool",
118
+ "Concat",
119
+ "Split",
120
+ "Reshape",
121
+ "Transpose",
122
+ "Flatten",
123
+ "Pad",
124
+ "QuantizeLinear",
125
+ "DequantizeLinear",
126
+ "Constant",
127
+ }
128
+ )
129
+
130
+
131
+ @dataclass
132
+ class TargetBackendProfile:
133
+ """Backend-specific compilation rules ensuring ONNX/EP lowering stays optimal and single-partition."""
134
+
135
+ name: str
136
+ ep_name: str
137
+ qdq_dialect: QDQDialect
138
+ tile_alignment: int = 1
139
+ fmha_min_block_sparsity: float = 0.25
140
+ allow_dynamic_quant: bool = True
141
+ prefer_custom_sparse_plugin: bool = False
142
+ enable_nvdla_stem_checks: bool = False
143
+ #: Expand bounded static ``scan`` regions instead of emitting ONNX ``Scan``.
144
+ #: Required by execution providers that forbid ``Loop``/``Scan``.
145
+ unroll_fixed_scan: bool = False
146
+ opset_version: int = 19
147
+ hardware: HardwareProfile = field(default_factory=HardwareProfile)
148
+ allowed_schemes: list[QuantScheme] = field(
149
+ default_factory=lambda: [
150
+ QuantScheme.FP32,
151
+ QuantScheme.BF16,
152
+ QuantScheme.INT8_STATIC_QDQ,
153
+ QuantScheme.INT8_DYNAMIC,
154
+ QuantScheme.INT8_WEIGHT_ONLY,
155
+ QuantScheme.INT4_GROUPWISE,
156
+ ]
157
+ )
158
+ supported_onnx_ops: frozenset[str] = _STANDARD_ACCELERATOR_ONNX_OPS
159
+ nvdla_legal_ops: frozenset[str] = _NVDLA_LEGAL_ONNX_OPS
160
+ #: ONNX element types the execution provider implements for ``Conv`` /
161
+ #: ``ConvTranspose`` compute. ONNX itself admits only float16/float/double,
162
+ #: so bfloat16 can never appear here.
163
+ conv_dtypes: frozenset[torch.dtype] = frozenset({torch.float32})
164
+ #: ONNX element types the execution provider implements for ``MatMul`` /
165
+ #: ``Gemm`` compute. bfloat16 is listed only where the EP has a BF16 GEMM
166
+ #: kernel; a bfloat16 Linear is refused everywhere else.
167
+ matmul_dtypes: frozenset[torch.dtype] = frozenset({torch.float32})
168
+ #: Quantized graph representation the provider consumes: explicit QDQ
169
+ #: pairs, QOperator kernels (``QLinearConv``/``QGemm``), or both.
170
+ quant_format: Literal["qdq", "qoperator", "both"] = "qdq"
171
+ #: Whether the provider documents INT8 Conv/MatMul kernels. Exports stay in
172
+ #: QDQ form regardless; the fusion audit reports whether they lowered.
173
+ int8_kernels: bool = False
174
+
175
+ @classmethod
176
+ def tensorrt_orin(cls, enable_nvdla_stems: bool = False) -> TargetBackendProfile:
177
+ """NVIDIA Jetson AGX Orin / DRIVE Orin (SM87 Ampere + optional 2x NVDLA)."""
178
+ return cls(
179
+ name="tensorrt_orin_sm87",
180
+ ep_name="TensorrtExecutionProvider",
181
+ qdq_dialect=QDQDialect.TRT_STATIC_SYMMETRIC_INT8,
182
+ tile_alignment=32,
183
+ # TensorRT fuses dense/causal FMHA in SRAM; only decompose if >=65% block sparse!
184
+ fmha_min_block_sparsity=0.65,
185
+ allow_dynamic_quant=False,
186
+ prefer_custom_sparse_plugin=True,
187
+ enable_nvdla_stem_checks=enable_nvdla_stems,
188
+ unroll_fixed_scan=True,
189
+ opset_version=19,
190
+ supported_onnx_ops=_STANDARD_ACCELERATOR_ONNX_OPS_WITH_IF,
191
+ hardware=HardwareProfile(
192
+ name="nvidia_orin_sm87",
193
+ peak_tflops_fp32=10.6,
194
+ memory_bandwidth_gbps=204.8,
195
+ kernel_launch_overhead_us=3.0,
196
+ ),
197
+ allowed_schemes=[
198
+ QuantScheme.FP32,
199
+ QuantScheme.FP16,
200
+ QuantScheme.INT8_STATIC_QDQ,
201
+ ],
202
+ # Ampere SM87: FP16 and BF16 Tensor Core GEMM, FP16/FP32 Conv
203
+ # (ONNX Conv forbids bfloat16). TensorRT imports QDQ only; it does
204
+ # not accept ONNX QLinearConv/QLinearMatMul QOperator nodes.
205
+ conv_dtypes=frozenset({torch.float32, torch.float16}),
206
+ matmul_dtypes=frozenset({torch.float32, torch.float16, torch.bfloat16}),
207
+ quant_format="qdq",
208
+ int8_kernels=True,
209
+ )
210
+
211
+ @classmethod
212
+ def tensorrt_thor(cls) -> TargetBackendProfile:
213
+ """NVIDIA Jetson Thor / DRIVE Thor (SM100 Blackwell with native FP8 & INT8 TensorCores)."""
214
+ return cls(
215
+ name="tensorrt_thor_sm100",
216
+ ep_name="TensorrtExecutionProvider",
217
+ qdq_dialect=QDQDialect.TRT_FP8_AND_INT8,
218
+ tile_alignment=64,
219
+ fmha_min_block_sparsity=0.65,
220
+ allow_dynamic_quant=False,
221
+ prefer_custom_sparse_plugin=True,
222
+ unroll_fixed_scan=True,
223
+ opset_version=19,
224
+ supported_onnx_ops=_STANDARD_ACCELERATOR_ONNX_OPS_WITH_IF,
225
+ hardware=HardwareProfile(
226
+ name="nvidia_thor_sm100",
227
+ peak_tflops_fp32=45.0,
228
+ memory_bandwidth_gbps=512.0,
229
+ kernel_launch_overhead_us=2.5,
230
+ ),
231
+ allowed_schemes=[
232
+ QuantScheme.FP32,
233
+ QuantScheme.BF16,
234
+ QuantScheme.FP8_E4M3_QDQ,
235
+ QuantScheme.INT8_STATIC_QDQ,
236
+ ],
237
+ # Blackwell SM100: BF16 GEMM Tensor Cores; ONNX Conv stays FP16/FP32.
238
+ conv_dtypes=frozenset({torch.float32, torch.float16}),
239
+ matmul_dtypes=frozenset({torch.float32, torch.float16, torch.bfloat16}),
240
+ quant_format="qdq",
241
+ int8_kernels=True,
242
+ )
243
+
244
+ @classmethod
245
+ def qnn_htp(cls) -> TargetBackendProfile:
246
+ """Qualcomm Hexagon Tensor Processor (Snapdragon Ride / Robotics RB5/RB6 via QNN EP)."""
247
+ return cls(
248
+ name="qualcomm_qnn_htp",
249
+ ep_name="QnnExecutionProvider",
250
+ qdq_dialect=QDQDialect.QNN_STATIC_ASYMMETRIC,
251
+ tile_alignment=32,
252
+ fmha_min_block_sparsity=0.50,
253
+ # DynamicQuantizeLinear forces catastrophic CPU fallback on Hexagon HTP!
254
+ allow_dynamic_quant=False,
255
+ prefer_custom_sparse_plugin=False,
256
+ unroll_fixed_scan=True,
257
+ opset_version=19,
258
+ hardware=HardwareProfile(
259
+ name="qualcomm_htp",
260
+ peak_tflops_fp32=6.0,
261
+ memory_bandwidth_gbps=136.0,
262
+ kernel_launch_overhead_us=2.0,
263
+ ),
264
+ allowed_schemes=[
265
+ QuantScheme.FP32,
266
+ QuantScheme.FP16,
267
+ QuantScheme.INT8_STATIC_QDQ,
268
+ ],
269
+ # Hexagon HTP: FP16/FP32 float ops, no BF16; INT8 via QDQ lowering.
270
+ conv_dtypes=frozenset({torch.float32, torch.float16}),
271
+ matmul_dtypes=frozenset({torch.float32, torch.float16}),
272
+ quant_format="qdq",
273
+ int8_kernels=True,
274
+ )
275
+
276
+ @classmethod
277
+ def openvino_cpu(cls) -> TargetBackendProfile:
278
+ """x86 AVX-512 / AMX or ARM Neoverse robotics IPC via OpenVINO / ORT CPU EP."""
279
+ return cls(
280
+ name="openvino_or_ort_cpu",
281
+ ep_name="CPUExecutionProvider",
282
+ qdq_dialect=QDQDialect.ORT_DYNAMIC_AND_STATIC,
283
+ tile_alignment=8,
284
+ fmha_min_block_sparsity=0.25,
285
+ allow_dynamic_quant=True,
286
+ prefer_custom_sparse_plugin=False,
287
+ opset_version=19,
288
+ supported_onnx_ops=_STANDARD_ACCELERATOR_ONNX_OPS_WITH_IF,
289
+ hardware=HardwareProfile.cpu_avx512(),
290
+ allowed_schemes=[
291
+ QuantScheme.FP32,
292
+ QuantScheme.FP16,
293
+ QuantScheme.INT8_STATIC_QDQ,
294
+ QuantScheme.INT8_DYNAMIC,
295
+ ],
296
+ # OpenVINO / ORT CPU over plain AVX-512: FP32/FP16 GEMM and Conv.
297
+ # BF16 GEMM needs AVX512_BF16/AMX, which this base CPU EP does not
298
+ # declare (ORT CPU rejects a BF16 Gemm as NOT_IMPLEMENTED), so BF16
299
+ # is deliberately absent. A future ``openvino_amx``/BF16 profile can
300
+ # add it once it also declares the matching ISA.
301
+ conv_dtypes=frozenset({torch.float32, torch.float16}),
302
+ matmul_dtypes=frozenset({torch.float32, torch.float16}),
303
+ quant_format="qdq",
304
+ int8_kernels=True,
305
+ )
306
+
307
+
308
+ #: Capability descriptor used whenever ``target_backend`` is ``None``.
309
+ #:
310
+ #: ``None`` means "generic ONNX Runtime CPU", not "anything goes": ORT CPU
311
+ #: implements FP32 and FP16 ``Conv``/``Gemm``/``MatMul``, has no BF16 ``Gemm``
312
+ #: kernel, and consumes QDQ graphs. INT8 fusion is host-ISA dependent
313
+ #: (VNNI/AMX), so it is not assumed: the fusion audit reports the real result
314
+ #: and ``require_fused_int8`` warns instead of enforcing fusion unless an EP
315
+ #: declares the kernels.
316
+ _GENERIC_ORT_CPU_PROFILE = TargetBackendProfile(
317
+ name="generic_ort_cpu",
318
+ ep_name="CPUExecutionProvider",
319
+ qdq_dialect=QDQDialect.ORT_DYNAMIC_AND_STATIC,
320
+ opset_version=19,
321
+ supported_onnx_ops=_STANDARD_ACCELERATOR_ONNX_OPS_WITH_IF,
322
+ conv_dtypes=frozenset({torch.float32, torch.float16}),
323
+ matmul_dtypes=frozenset({torch.float32, torch.float16}),
324
+ quant_format="qdq",
325
+ int8_kernels=False,
326
+ allowed_schemes=[
327
+ QuantScheme.FP32,
328
+ QuantScheme.FP16,
329
+ QuantScheme.INT8_STATIC_QDQ,
330
+ QuantScheme.INT8_DYNAMIC,
331
+ QuantScheme.INT8_WEIGHT_ONLY,
332
+ ],
333
+ )
334
+
335
+
336
+ def resolve_profile(
337
+ target_backend: TargetBackendProfile | None,
338
+ ) -> TargetBackendProfile:
339
+ """Return the declared profile, or the explicit generic ORT CPU descriptor.
340
+
341
+ Every legality gate goes through this helper so ``target_backend=None`` is
342
+ one code path with an explicit capability set instead of "no constraints".
343
+ The generic descriptor is copied so a caller cannot mutate the shared
344
+ module-level singleton.
345
+ """
346
+ if target_backend is None:
347
+ # Deep copy (not just a shallow copy) so a caller mutating the mutable
348
+ # ``allowed_schemes`` list cannot corrupt the shared singleton either.
349
+ return copy.deepcopy(_GENERIC_ORT_CPU_PROFILE)
350
+ return target_backend
@@ -0,0 +1,21 @@
1
+ # Copyright 2026 Athrva Pandhare
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ """Measured ONNX Runtime benchmark harness.
5
+
6
+ Every number produced here is measured on the machine that runs the
7
+ benchmark: the artifact is loaded by ONNX Runtime, warmed up, and timed with
8
+ :func:`time.perf_counter`. Nothing is estimated from the cost model.
9
+ """
10
+
11
+ from markat.benchmark.runner import (
12
+ BenchmarkResult,
13
+ benchmark_onnx_artifact,
14
+ benchmark_simplified,
15
+ )
16
+
17
+ __all__ = [
18
+ "BenchmarkResult",
19
+ "benchmark_onnx_artifact",
20
+ "benchmark_simplified",
21
+ ]