michalpiszczek commented on a change in pull request #10087:
URL: https://github.com/apache/tvm/pull/10087#discussion_r794100518
##########
File path: tests/python/relay/test_vm.py
##########
@@ -1174,6 +1174,32 @@ def test_large_constants():
tvm.testing.assert_allclose(expected, actual.numpy())
+def test_load_late_bound_consts_with_no_late_bound_consts():
+ """Check that load_late_bound_consts handles a model with no late bound
consts."""
+ target = tvm.target.Target("llvm")
+
+ const_data = np.random.rand(1).astype("float64")
+ x = relay.var("x", shape=(1,), dtype="float64")
+ const = relay.const(const_data, dtype="float64")
+
+ func = relay.Function([x], relay.op.add(x, const))
+ mod = tvm.IRModule.from_expr(func)
+
+ vm_exec = vm.compile(mod, target=target)
+
+ temp = utils.tempdir()
+ path_consts = temp.relpath("consts")
+ path_dso = temp.relpath("lib.so")
+
+ # Ensure const_data is not above the byte threshold for a late-bound const.
Review comment:
```suggestion
# Ensure const_data is below the byte threshold for a late-bound const.
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]