Spaces:
Running
Running
switch to using localizedDescription (llama/7010)
Browse files- ggml-metal.m +2 -36
ggml-metal.m
CHANGED
|
@@ -2795,42 +2795,8 @@ static enum ggml_status ggml_metal_graph_compute(
|
|
| 2795 |
if (status != MTLCommandBufferStatusCompleted) {
|
| 2796 |
GGML_METAL_LOG_INFO("%s: command buffer %d failed with status %lu\n", __func__, i, status);
|
| 2797 |
if (status == MTLCommandBufferStatusError) {
|
| 2798 |
-
|
| 2799 |
-
|
| 2800 |
-
case MTLCommandBufferErrorNone:
|
| 2801 |
-
GGML_METAL_LOG_INFO("no error code reported\n");
|
| 2802 |
-
break;
|
| 2803 |
-
case MTLCommandBufferErrorTimeout:
|
| 2804 |
-
GGML_METAL_LOG_INFO("timeout\n");
|
| 2805 |
-
break;
|
| 2806 |
-
case MTLCommandBufferErrorPageFault:
|
| 2807 |
-
GGML_METAL_LOG_INFO("unserviceable page fault\n");
|
| 2808 |
-
break;
|
| 2809 |
-
case MTLCommandBufferErrorOutOfMemory:
|
| 2810 |
-
GGML_METAL_LOG_INFO("out of memory\n");
|
| 2811 |
-
break;
|
| 2812 |
-
case MTLCommandBufferErrorInvalidResource:
|
| 2813 |
-
GGML_METAL_LOG_INFO("invalid reference to resource\n");
|
| 2814 |
-
break;
|
| 2815 |
-
case MTLCommandBufferErrorMemoryless:
|
| 2816 |
-
GGML_METAL_LOG_INFO("GPU ran out of one or more of its internal resources that support memoryless render pass attachments\n");
|
| 2817 |
-
break;
|
| 2818 |
-
//case MTLCommandBufferErrorDeviceRemoved:
|
| 2819 |
-
// GGML_METAL_LOG_INFO("device removed\n");
|
| 2820 |
-
// break;
|
| 2821 |
-
case MTLCommandBufferErrorStackOverflow:
|
| 2822 |
-
GGML_METAL_LOG_INFO("kernel function of tile shader used too many stack frames\n");
|
| 2823 |
-
break;
|
| 2824 |
-
case MTLCommandBufferErrorAccessRevoked:
|
| 2825 |
-
GGML_METAL_LOG_INFO("access to device revoked by system\n");
|
| 2826 |
-
break;
|
| 2827 |
-
case MTLCommandBufferErrorInternal:
|
| 2828 |
-
GGML_METAL_LOG_INFO("internal error\n");
|
| 2829 |
-
break;
|
| 2830 |
-
default:
|
| 2831 |
-
GGML_METAL_LOG_INFO("unknown error %lu\n", error_code);
|
| 2832 |
-
break;
|
| 2833 |
-
}
|
| 2834 |
}
|
| 2835 |
|
| 2836 |
return GGML_STATUS_FAILED;
|
|
|
|
| 2795 |
if (status != MTLCommandBufferStatusCompleted) {
|
| 2796 |
GGML_METAL_LOG_INFO("%s: command buffer %d failed with status %lu\n", __func__, i, status);
|
| 2797 |
if (status == MTLCommandBufferStatusError) {
|
| 2798 |
+
NSString * error_code = [command_buffer error].localizedDescription;
|
| 2799 |
+
GGML_METAL_LOG_INFO("error: %s\n", [error_code UTF8String]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2800 |
}
|
| 2801 |
|
| 2802 |
return GGML_STATUS_FAILED;
|