diff --git a/src/runtime/metal/metal_module.mm b/src/runtime/metal/metal_module.mm index deb863c69b47..0066b651fc7d 100644 --- a/src/runtime/metal/metal_module.mm +++ b/src/runtime/metal/metal_module.mm @@ -212,7 +212,7 @@ void operator()(ffi::PackedArgs args, ffi::Any* rv, const ArgUnion64* pack_args) ThreadWorkLoad wl = launch_param_config_.Extract(args); int blockSize = wl.block_dim(0) * wl.block_dim(1) * wl.block_dim(2); auto maxTotalThreadsPerThreadgroup = scache_[device_id].maxTotalThreadsPerThreadgroup; - CHECK_LE(blockSize, maxTotalThreadsPerThreadgroup); + TVM_FFI_ICHECK_LE(blockSize, maxTotalThreadsPerThreadgroup); // attach error message directly in this functio id cb = stream->GetCommandBuffer(/*label=*/"TVMKernel:" + func_name_, /*attach_error_callback=*/false);