Add nvidia and amd backends (#6157)

This commit is contained in:
AidanBeltonS 2024-03-21 06:10:52 +00:00 committed by GitHub
parent 42e21c6882
commit c5b8595e3f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -977,8 +977,10 @@ namespace dpct
static int convert_backend_index(std::string & backend) { static int convert_backend_index(std::string & backend) {
if (backend == "ext_oneapi_level_zero:gpu") return 0; if (backend == "ext_oneapi_level_zero:gpu") return 0;
if (backend == "opencl:gpu") return 1; if (backend == "opencl:gpu") return 1;
if (backend == "opencl:cpu") return 2; if (backend == "ext_oneapi_cuda:gpu") return 2;
if (backend == "opencl:acc") return 3; if (backend == "ext_oneapi_hip:gpu") return 3;
if (backend == "opencl:cpu") return 4;
if (backend == "opencl:acc") return 5;
printf("convert_backend_index: can't handle backend=%s\n", backend.c_str()); printf("convert_backend_index: can't handle backend=%s\n", backend.c_str());
GGML_ASSERT(false); GGML_ASSERT(false);
} }