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 <mesozoic.egg@proton.me>
This commit is contained in:
mesozoic-egg
2024-11-22 09:17:58 +08:00
committed by GitHub
parent d5c9fafff5
commit 855f9a767a

View File

@@ -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]