|
|
@ -502,8 +502,8 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize) |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
FILE *binaryfile; |
|
|
|
FILE *binaryfile; |
|
|
|
size_t *binary_sizes = NULL; |
|
|
|
size_t *binary_sizes; |
|
|
|
char **binaries = NULL; |
|
|
|
char **binaries; |
|
|
|
int pl; |
|
|
|
int pl; |
|
|
|
char *source = file_contents(filename, &pl); |
|
|
|
char *source = file_contents(filename, &pl); |
|
|
|
size_t sourceSize[] = {(size_t)pl}; |
|
|
|
size_t sourceSize[] = {(size_t)pl}; |
|
|
@ -514,11 +514,6 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize) |
|
|
|
if (!source) |
|
|
|
if (!source) |
|
|
|
return NULL; |
|
|
|
return NULL; |
|
|
|
|
|
|
|
|
|
|
|
/* OSX OpenCL breaks reading off binaries with >1 GPU so always build
|
|
|
|
|
|
|
|
* from source. */ |
|
|
|
|
|
|
|
#ifdef __APPLE__ |
|
|
|
|
|
|
|
goto build; |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
binary_sizes = calloc(sizeof(size_t) * MAX_GPUDEVICES * 4, 1); |
|
|
|
binary_sizes = calloc(sizeof(size_t) * MAX_GPUDEVICES * 4, 1); |
|
|
|
if (unlikely(!binary_sizes)) { |
|
|
|
if (unlikely(!binary_sizes)) { |
|
|
|
applog(LOG_ERR, "Unable to calloc binary_sizes"); |
|
|
|
applog(LOG_ERR, "Unable to calloc binary_sizes"); |
|
|
@ -667,7 +662,10 @@ build: |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
prog_built = true; |
|
|
|
prog_built = true; |
|
|
|
|
|
|
|
|
|
|
|
#ifdef __APPLE__ |
|
|
|
#ifdef __APPLE__ |
|
|
|
|
|
|
|
/* OSX OpenCL breaks reading off binaries with >1 GPU so always build
|
|
|
|
|
|
|
|
* from source. */ |
|
|
|
goto built; |
|
|
|
goto built; |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|