gemini-code-assist[bot] commented on code in PR #19595:
URL: https://github.com/apache/tvm/pull/19595#discussion_r3292613486
##########
src/runtime/metal/metal_module.mm:
##########
@@ -124,7 +124,11 @@ int GetPropertyMask() const final {
if (fmt_ == "metal") {
MTLCompileOptions* opts = [MTLCompileOptions alloc];
+#if defined(MTLLanguageVersion4_0)
Review Comment:

The preprocessor check `#if defined(MTLLanguageVersion4_0)` will likely
evaluate to false even on SDKs that support it. In the Apple Metal headers,
`MTLLanguageVersion` constants are defined as enum values, not as macros.
Consequently, `defined()` cannot detect their presence. This results in the
code always falling back to `MTLLanguageVersion2_3`, effectively making this
change a no-op.
Additionally, `MTLLanguageVersion4_0` is not present in current public Apple
SDKs (the latest stable version is 3.1). If you are targeting a specific
internal or future SDK, please ensure that `MTLLanguageVersion4_0` is
explicitly defined as a macro. Otherwise, consider using SDK version macros
such as `__MAC_OS_X_VERSION_MAX_ALLOWED` or `__IPHONE_OS_VERSION_MAX_ALLOWED`
for feature detection.
--
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]