Skip to content

Commit

Permalink
Fix loading on unsupported platforms (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
christiangnrd committed Jan 25, 2025
1 parent 4117826 commit 500e6a6
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 168 deletions.
18 changes: 9 additions & 9 deletions lib/mps/libmps.jl
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ end
@objcproperties MPSNDArrayDescriptor begin
@autoproperty dataType::MPSDataType setter = setDataType
@autoproperty numberOfDimensions::UInt64 setter = setNumberOfDimensions
@static if Metal.macos_version() >= v"15.0.0"
@static if Metal.is_macos(v"15.0.0")
@autoproperty preferPackedRows::Bool setter = setPreferPackedRows
end
end
Expand Down Expand Up @@ -2545,7 +2545,7 @@ end

@objcwrapper immutable = true MPSNDArrayGatherGradient <: MPSNDArrayBinaryPrimaryGradientKernel

@static if Metal.macos_version() >= v"15.0.0"
@static if Metal.is_macos(v"15.0.0")
@objcwrapper immutable = true MPSNDArrayIdentity <: MPSNDArrayUnaryKernel
end

Expand All @@ -2555,15 +2555,15 @@ end
MPSNDArrayQuantizationTypeLUT = 0x0000000000000002
end

@static if Metal.macos_version() >= v"15.0.0"
@static if Metal.is_macos(v"15.0.0")
@objcwrapper immutable = true MPSNDArrayQuantizationDescriptor <: NSObject
@objcproperties MPSNDArrayQuantizationDescriptor begin
@autoproperty quantizationDataType::MPSDataType
@autoproperty quantizationScheme::MPSNDArrayQuantizationScheme
end
end

@static if Metal.macos_version() >= v"15.0.0"
@static if Metal.is_macos(v"15.0.0")
@objcwrapper immutable = true MPSNDArrayAffineQuantizationDescriptor <: MPSNDArrayQuantizationDescriptor
@objcproperties MPSNDArrayAffineQuantizationDescriptor begin
@autoproperty hasZeroPoint::Bool setter = setHasZeroPoint
Expand All @@ -2572,26 +2572,26 @@ end
end
end

@static if Metal.macos_version() >= v"15.0.0"
@static if Metal.is_macos(v"15.0.0")
@objcwrapper immutable = true MPSNDArrayLUTQuantizationDescriptor <: MPSNDArrayQuantizationDescriptor
end

@static if Metal.macos_version() >= v"15.0.0"
@static if Metal.is_macos(v"15.0.0")
@objcwrapper immutable = true MPSNDArrayQuantizedMatrixMultiplication <: MPSNDArrayMatrixMultiplication
end

@static if Metal.macos_version() >= v"15.0.0"
@static if Metal.is_macos(v"15.0.0")
@objcwrapper immutable = true MPSNDArrayLUTDequantize <: MPSNDArrayMultiaryKernel
end

@static if Metal.macos_version() >= v"15.0.0"
@static if Metal.is_macos(v"15.0.0")
@objcwrapper immutable = true MPSNDArrayVectorLUTDequantize <: MPSNDArrayMultiaryKernel
@objcproperties MPSNDArrayVectorLUTDequantize begin
@autoproperty vectorAxis::UInt64 setter = setVectorAxis
end
end

@static if Metal.macos_version() >= v"15.0.0"
@static if Metal.is_macos(v"15.0.0")
@objcwrapper immutable = true MPSNDArrayAffineInt4Dequantize <: MPSNDArrayMultiaryKernel
end

Expand Down
Loading

0 comments on commit 500e6a6

Please sign in to comment.