oraluben commented on PR #19595:
URL: https://github.com/apache/tvm/pull/19595#issuecomment-4761057883

   Added a runtime/device guard in addition to the SDK-version guard, so 
`MTLLanguageVersion4_0` is only requested when the binary is built with an SDK 
that exposes it and the runtime device reports `MTLGPUFamilyMetal4`. Otherwise 
the existing `MTLLanguageVersion2_3` path is used.
   
   For validation, I tested this through TileLang, which is the downstream user 
that needs the new MSL 4 cooperative-tensor syntax:
   
   - Metal 4 path: TileLang cooperative-tensor kernels compile and run on a 
Metal-4-capable Apple GPU with the macOS 26 SDK/runtime.
   - Fallback path: TileLang Metal tests also pass on GitHub Actions with macOS 
26 on M1. This is the important compatibility case for this PR: the 
build/runtime environment exposes the Metal 4 SDK symbols, but the M1 device 
does not support `MTLGPUFamilyMetal4`, so TVM must compile ordinary Metal 
shaders with `MTLLanguageVersion2_3`. Passing the TileLang Metal test suite in 
that environment confirms the runtime fallback is working.
   
   So the current branch covers the regression concern from the earlier review: 
a TVM binary built with a macOS 26 SDK does not unconditionally request MSL 4.0 
on older Apple GPUs.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to