This is an automated email from the ASF dual-hosted git repository.
tqchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git
The following commit(s) were added to refs/heads/main by this push:
new c33ef53584 [Fix][Metal] Update Timer construction after the
non-nullable handle change (#20698)
c33ef53584 is described below
commit c33ef53584e2a3898a0f697a8b1f3e58552b6fa7
Author: Akaash Parthasarathy <[email protected]>
AuthorDate: Tue Oct 13 04:14:30 2026 -0700
[Fix][Metal] Update Timer construction after the non-nullable handle change
(#20698)
---
src/backend/metal/runtime/metal_device_api.mm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/backend/metal/runtime/metal_device_api.mm
b/src/backend/metal/runtime/metal_device_api.mm
index 357a568667..ebf03938b2 100644
--- a/src/backend/metal/runtime/metal_device_api.mm
+++ b/src/backend/metal/runtime/metal_device_api.mm
@@ -440,8 +440,9 @@ class MetalTimerObj : public TimerObj {
TVM_FFI_STATIC_INIT_BLOCK() {
namespace refl = tvm::ffi::reflection;
- refl::GlobalDef().def("runtime.timer.metal",
- [](Device dev) { return
Timer(ffi::make_object<MetalTimerObj>(dev)); });
+ refl::GlobalDef().def("runtime.timer.metal", [](Device dev) {
+ return Timer(ffi::UnsafeInit{}, ffi::make_object<MetalTimerObj>(dev));
+ });
}
} // namespace metal