[metal] Add MetalBackend method overrides for codegen#1852
Conversation
50c2a72 to
d56d963
Compare
079ec49 to
c1ffd7c
Compare
c1ffd7c to
60b3b28
Compare
60b3b28 to
f407364
Compare
682bce6 to
8565279
Compare
8565279 to
99bfd78
Compare
99bfd78 to
af77035
Compare
af77035 to
72032bf
Compare
jansel
left a comment
There was a problem hiding this comment.
Is there test coverage for this? Maybe it would be good to get things working to the point you can compile a basic add kernel.
| def reshape_expr(self, expr: str, shape: str) -> str: | ||
| return expr | ||
|
|
||
| def broadcast_to_expr(self, expr: str, shape: str) -> str: | ||
| return expr |
There was a problem hiding this comment.
I don't think this is right.
There was a problem hiding this comment.
Metal uses per-thread scalar dispatch — each thread processes one element, so there are no block dimensions. Hence, these are identity operations. Tests coming up in #1794 and #1796.
I also have matmul tests in an unpublished PRs on top of this current stack. Matmuls will use a cooperative thread model, similar to cute
Tests for copy kernels are coming in later PR in the stack: #1794 I broke up 1794 in smaller PRs for easier reviewing. |
Add MetalBackend overrides for index_type, constexpr, program_id, grid_index, full/reshape/broadcast_to/zeros expressions, where/min, autotune, transform_host_arg, and launcher_keyword_args. stack-info: PR: #1852, branch: aditvenk/stack/18
72032bf to
28567a8
Compare
Stacked PRs:
[metal] Add MetalBackend method overrides for codegen
Add MetalBackend overrides for index_type, constexpr, program_id,
grid_index, full/reshape/broadcast_to/zeros expressions, where/min,
autotune, transform_host_arg, and launcher_keyword_args.