From 855f9a767a050db456ff4b6da25029d19a7bcc62 Mon Sep 17 00:00:00 2001 From: mesozoic-egg <133102390+mesozoic-egg@users.noreply.github.com> Date: Fri, 22 Nov 2024 09:17:58 +0800 Subject: [PATCH] add restype for msg method for type annotation and consistency (#7828) * no need to explicitly set objc_id as restype * add restype for type annotation --------- Co-authored-by: Mesozoic Egg --- tinygrad/runtime/graph/metal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tinygrad/runtime/graph/metal.py b/tinygrad/runtime/graph/metal.py index 6016399b1e..84c5f7d1dc 100644 --- a/tinygrad/runtime/graph/metal.py +++ b/tinygrad/runtime/graph/metal.py @@ -69,7 +69,7 @@ class MetalGraph(GraphRunner): input_rawbuffers[input_idx]._buf.offset, i) for j, global_dims, local_dims in self.updated_launch_dims(var_vals): - computeCommand = msg(self.icb, "indirectComputeCommandAtIndex:", j) + computeCommand = msg(self.icb, "indirectComputeCommandAtIndex:", j, restype=objc_id) msg(computeCommand, "concurrentDispatchThreadgroups:threadsPerThreadgroup:", to_struct(*global_dims), to_struct(*local_dims)) for j, var in enumerate(self.vars): self.int_buf_view[j] = var_vals[var]