Better error message on older macos

This commit is contained in:
Nicolas Patry
2023-12-15 11:18:54 +01:00
parent 77197379cc
commit 34d83377f6

View File

@ -243,9 +243,11 @@ impl Kernels {
let lib = match source { let lib = match source {
Source::Mfa => { Source::Mfa => {
let source_data = MFA; let source_data = MFA;
device device.new_library_with_data(source_data).map_err(|e| {
.new_library_with_data(source_data) MetalKernelError::LoadLibraryError(format!(
.map_err(|e| MetalKernelError::LoadLibraryError(e.to_string()))? "Candle metal requires macosx > 13.0 or higher, cannot load mfa: {e}"
))
})?
} }
source => { source => {
let source_content = self.get_library_source(source); let source_content = self.get_library_source(source);