MCPcopy Index your code
hub / github.com/apache/tvm / split_transform_deploy_mod

Function split_transform_deploy_mod

tests/python/relax/test_codegen_cutlass.py:1244–1260  ·  view source on GitHub ↗
(mod)

Source from the content-addressed store, hash-verified

1242
1243
1244def split_transform_deploy_mod(mod):
1245 mod_transform = tvm.IRModule()
1246 mod_deploy = tvm.IRModule().with_attrs(mod.attrs)
1247
1248 transform_func_name = None
1249
1250 for gv, func in mod.functions.items():
1251 if "transform_params" in gv.name_hint:
1252 transform_func_name = gv.name_hint
1253 mod_transform[gv] = func
1254 elif isinstance(func, tvm.tirx.PrimFunc):
1255 mod_transform[gv] = func
1256 else:
1257 mod_deploy[gv] = func
1258
1259 assert transform_func_name is not None
1260 return mod_transform, mod_deploy, transform_func_name
1261
1262
1263def test_fp16A_int4B_gemm():

Calls 2

with_attrsMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…