# Error with tune\_tir

**URL:** <https://discuss.tvm.apache.org/t/error-with-tune-tir/18801>\
**Category:** Questions\
**Created:** [December 1, 2025, 2:15am UTC](https://discuss.tvm.apache.org/t/error-with-tune-tir/18801 "2025-12-01T02:15:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![a333222](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/a333222/32/6114_2.png) [@a333222](https://discuss.tvm.apache.org/u/a333222)\
**Post date:** [December 1, 2025, 2:15am UTC](https://discuss.tvm.apache.org/t/error-with-tune-tir/18801/1 "2025-12-01T02:15:46Z")

</div>

mod, params = relax.frontend.detach\_params(mod)

mod = relax.get\_pipeline(“zero”)(mod)

db = ms.tir\_integration.tune\_tir( mod=mod, target=target, work\_dir=“./tuning\_spr\_logs”, max\_trials\_global=8000, # SPR은 코어 많아서 더 돌려야 최고 기록 나옴 max\_trials\_per\_task=100, num\_trials\_per\_iter=64, # 한 번에 더 많은 후보 테스트 builder=ms.builder.LocalBuilder(), runner=ms.runner.LocalRunner(evaluator\_config=ms.runner.EvaluatorConfig(number=3, repeat=10)), database=ms.database.JSONDatabase(work\_dir=“./tuning\_spr\_logs”), )

print(“튜닝 완료! 최고 성능 기록이 database에 저장됨”) print(db.get\_all\_tuning\_records()[0]) print(len(db.get\_all\_tuning\_records())) print(db.has\_workload(mod=mod))

Result

…

meta\_schedule.TuningRecord(0x7c552c0aaa30) 2345 Fasle None

With the above code, tuning seems to be recorded well, but print(db.has\_workload(mod=mod)) returns false and print(db.query(mod=mod,target=target)) returns none.

The db is saved correctly, but is this because of incorrect code, or is there a problem with the version (0.22)?
