feat: CUDA 10.2 / C++14 compatibility for Jetson TX2 (compute 6.2)#21968
Draft
sourceupdev wants to merge 1 commit intoggml-org:masterfrom
Draft
feat: CUDA 10.2 / C++14 compatibility for Jetson TX2 (compute 6.2)#21968sourceupdev wants to merge 1 commit intoggml-org:masterfrom
sourceupdev wants to merge 1 commit intoggml-org:masterfrom
Conversation
Minimal-diff approach to support GCC 9 + nvcc 10.2 with --expt-relaxed-constexpr: - Add compat-cuda10.cuh: bf16->fp16 polyfills (no hw bf16 on compute 6.2) - Guard cuda_bf16.h include with CUDART_VERSION >= 11000 - CMake: C++14 std, arch 62, --expt-relaxed-constexpr for CUDA < 11.0 - Replace std::is_same_v with std::is_same<>::value (C++14) - Convert fold expressions to C++14 equivalents - Convert structured bindings to explicit .first/.second - Guard cooperative_groups (cg::this_grid) behind CUDART_VERSION >= 11000 - Fix cudaStreamWaitEvent 2-arg calls (CUDA 10.2 requires 3rd flags param) - Replace __builtin_assume with GGML_CUDA_ASSUME macro - Fix static inline const/auto to constexpr with explicit types - Fix if-init statements to C++14 style 14 files changed (13 modified + 1 new), 160 insertions, 98 deletions Tested: build OK, CPU inference 0.7 t/s, GPU inference 7.3 t/s (gemma-4-E2B Q4_0)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
THIS IS A CHANGE ONLY TO PERSIST A WORKING VERSION ON JETSON-TX2, not intended for MAIN Llama-CPP
Minimal-diff approach to support GCC 9 + nvcc 10.2 with --expt-relaxed-constexpr:
14 files changed (13 modified + 1 new), 160 insertions, 98 deletions Tested: build OK, CPU inference 0.7 t/s, GPU inference 7.3 t/s (gemma-4-E2B Q4_0)
Overview
Additional information
Requirements