mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-12-26 03:14:35 +00:00
Add preprocessor checks for Apple devices.
Based on work by @rbourgeat in https://github.com/ggerganov/llama.cpp/pull/5322/files
This commit is contained in:
parent
42f664a382
commit
d8c054517d
@ -1109,10 +1109,15 @@ static void ggml_vk_instance_init() {
|
|||||||
#ifdef GGML_VULKAN_VALIDATE
|
#ifdef GGML_VULKAN_VALIDATE
|
||||||
"VK_EXT_validation_features",
|
"VK_EXT_validation_features",
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef __APPLE__
|
||||||
"VK_KHR_portability_enumeration",
|
"VK_KHR_portability_enumeration",
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
vk::InstanceCreateInfo instance_create_info(vk::InstanceCreateFlags(), &app_info, layers, extensions);
|
||||||
|
#ifdef __APPLE__
|
||||||
|
instance_create_info.flags = vk::InstanceCreateFlagBits::eEnumeratePortabilityKHR;
|
||||||
|
#endif
|
||||||
|
|
||||||
vk::InstanceCreateInfo instance_create_info(vk::InstanceCreateFlags(vk::InstanceCreateFlagBits::eEnumeratePortabilityKHR), &app_info, layers, extensions);
|
|
||||||
#ifdef GGML_VULKAN_VALIDATE
|
#ifdef GGML_VULKAN_VALIDATE
|
||||||
const std::vector<vk::ValidationFeatureEnableEXT> features_enable = { vk::ValidationFeatureEnableEXT::eBestPractices };
|
const std::vector<vk::ValidationFeatureEnableEXT> features_enable = { vk::ValidationFeatureEnableEXT::eBestPractices };
|
||||||
vk::ValidationFeaturesEXT validation_features = {
|
vk::ValidationFeaturesEXT validation_features = {
|
||||||
|
Loading…
Reference in New Issue
Block a user