You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "ashutosh-arm (via GitHub)" <gi...@apache.org> on 2023/03/03 13:18:34 UTC
[GitHub] [tvm] ashutosh-arm commented on a diff in pull request #14186: [TVMC] Add option to dump TIR code to file
ashutosh-arm commented on code in PR #14186:
URL: https://github.com/apache/tvm/pull/14186#discussion_r1124442940
##########
tests/python/driver/tvmc/test_compiler.py:
##########
@@ -87,6 +88,16 @@ def test_compile_tflite_module(use_vm, tflite_mobilenet_v1_1_quant):
verify_compile_tflite_module(tflite_mobilenet_v1_1_quant, shape_dict, use_vm=use_vm)
+def test_tir_dump(tflite_mobilenet_v1_1_quant):
+ pytest.importorskip("tflite")
+ tvmc_model = tvmc.load(tflite_mobilenet_v1_1_quant)
+ tvmc_package = tvmc.compile(tvmc_model, target="llvm", dump_code="tir")
+ dumps_path = tvmc_package.package_path + ".tir"
+ assert os.path.exists(dumps_path)
+ with open(dumps_path) as f:
+ assert "tir" in f.read()
Review Comment:
@lhutton1, feels great to see this addition to `dump_code` :smile: Just a small question about testing: does this file already have a test for dumping multiple IRs from the same command?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org