Skip to content

CUDA: fix __builtin_assume for CUDA < 11.2 #2669

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion ggml-cuda.cu
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,14 @@ static_assert(sizeof(half) == sizeof(ggml_fp16_t), "wrong fp16 size");
exit(1); \
} \
} while (0)
#endif // CUDART_VERSION >= 11
#endif // CUDART_VERSION >= 12000

// define nop for old CUDA versions to fix compilation issues
#if CUDART_VERSION < 11020
__device__ void __builtin_assume(bool exp) {
(void) exp;
}
#endif // CUDART_VERSION < 11020

#ifdef GGML_CUDA_F16
typedef half dfloat; // dequantize float
Expand Down