Work with Mac M1
This commit is contained in:
parent
5ed26e1fc9
commit
e72defac41
2 changed files with 9 additions and 1 deletions
|
@ -977,9 +977,15 @@ void ggml_vk_init() {
|
||||||
const std::vector<const char*> extensions = {
|
const std::vector<const char*> extensions = {
|
||||||
#ifdef GGML_VULKAN_VALIDATE
|
#ifdef GGML_VULKAN_VALIDATE
|
||||||
"VK_EXT_validation_features",
|
"VK_EXT_validation_features",
|
||||||
|
#endif
|
||||||
|
#ifdef __APPLE__
|
||||||
|
"VK_KHR_portability_enumeration",
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
vk::InstanceCreateInfo instance_create_info(vk::InstanceCreateFlags(), &app_info, layers, extensions);
|
vk::InstanceCreateInfo instance_create_info(vk::InstanceCreateFlags(), &app_info, layers, extensions);
|
||||||
|
#ifdef __APPLE__
|
||||||
|
instance_create_info.flags = vk::InstanceCreateFlagBits::eEnumeratePortabilityKHR;
|
||||||
|
#endif
|
||||||
#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 = {
|
||||||
|
|
2
ggml.c
2
ggml.c
|
@ -270,6 +270,8 @@ inline static void * ggml_calloc(size_t num, size_t size) {
|
||||||
#include <Accelerate/Accelerate.h>
|
#include <Accelerate/Accelerate.h>
|
||||||
#if defined(GGML_USE_CLBLAST) // allow usage of CLBlast alongside Accelerate functions
|
#if defined(GGML_USE_CLBLAST) // allow usage of CLBlast alongside Accelerate functions
|
||||||
#include "ggml-opencl.h"
|
#include "ggml-opencl.h"
|
||||||
|
#elif defined(GGML_USE_VULKAN) && __APPLE__
|
||||||
|
#include "ggml-vulkan.h"
|
||||||
#endif
|
#endif
|
||||||
#elif defined(GGML_USE_OPENBLAS)
|
#elif defined(GGML_USE_OPENBLAS)
|
||||||
#if defined(GGML_BLAS_USE_MKL)
|
#if defined(GGML_BLAS_USE_MKL)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue