Skip to content

Commit 075fae3

Browse files
Update ggml/src/ggml-cuda/ggml-cuda.cu
Adjusted the judgment logic Co-authored-by: Johannes Gäßler <[email protected]>
1 parent eea49ab commit 075fae3

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

ggml/src/ggml-cuda/ggml-cuda.cu

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3269,11 +3269,7 @@ static bool ggml_backend_cuda_device_supports_op(ggml_backend_dev_t dev, const g
32693269
static bool ggml_backend_cuda_device_supports_buft(ggml_backend_dev_t dev, ggml_backend_buffer_type_t buft) {
32703270
ggml_backend_cuda_device_context * dev_ctx = (ggml_backend_cuda_device_context *) dev->context;
32713271
const bool integrated = ggml_cuda_info().devices[dev_ctx->device].integrated;
3272-
if(integrated){
3273-
return (ggml_backend_buft_is_cuda(buft) || ggml_backend_buft_is_cuda_split(buft) ||ggml_backend_buft_is_cuda_host(buft)) && buft->device == dev;
3274-
}else{
3275-
return (ggml_backend_buft_is_cuda(buft) || ggml_backend_buft_is_cuda_split(buft)) && buft->device == dev;
3276-
}
3272+
return (ggml_backend_buft_is_cuda(buft) || ggml_backend_buft_is_cuda_split(buft) || (integrated && ggml_backend_buft_is_cuda_host(buft))) && buft->device == dev;
32773273
}
32783274

32793275
static int64_t get_op_batch_size(const ggml_tensor * op) {

0 commit comments

Comments
 (0)