common : move arg parser code to arg.cpp#9388
Merged
ngxson merged 10 commits intoggml-org:masterfrom Sep 9, 2024
Merged
Conversation
ngxson
commented
Sep 9, 2024
ggerganov
reviewed
Sep 9, 2024
ggerganov
approved these changes
Sep 9, 2024
ggerganov
approved these changes
Sep 9, 2024
m18coppola
reviewed
Sep 10, 2024
| else { | ||
| throw std::invalid_argument("invalid value"); | ||
| } | ||
| #ifndef GGML_USE_CUDA_SYCL_VULKAN |
Contributor
There was a problem hiding this comment.
I don't think this #ifndef is working as intended
Contributor
Author
There was a problem hiding this comment.
can you suggest a patch?
Contributor
There was a problem hiding this comment.
Suggested change
| #ifndef GGML_USE_CUDA_SYCL_VULKAN | |
| #if defined(GGML_CUDA) || defined(GGML_SYCL) || defined(GGML_VULKAN) | |
| #define GGML_USE_CUDA_SYCL_VULKAN | |
| #endif | |
| #ifndef GGML_USE_CUDA_SYCL_VULKAN |
I'm not sure if the idiosyncrasy is to do this here or in the makefile. If it's decided to do this in the makefile, I wouldn't be confident on how to get it into the cmake build system.
Contributor
There was a problem hiding this comment.
Upon review, it looks like the macro is already in common.cpp. Maybe it needs to be moved to the header file?
Contributor
Author
There was a problem hiding this comment.
Yes we can move it here. However, the naming is quite misleading, so I'd suggest not to abstract it:
Suggested change
| #ifndef GGML_USE_CUDA_SYCL_VULKAN | |
| #if (!defined(GGML_USE_CUDA) && !defined(GGML_USE_SYCL)) && !defined(GGML_USE_VULKAN) |
dsx1986
pushed a commit
to dsx1986/llama.cpp
that referenced
this pull request
Oct 29, 2024
* common : move arg parser to arg.cpp * better categorize args * add cmake * missing climits * missing cstdarg * common : more explicit includes * fix build * refactor gpt_params_parse * update server readme * fix test --------- Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
arthw
pushed a commit
to arthw/llama.cpp
that referenced
this pull request
Nov 15, 2024
* common : move arg parser to arg.cpp * better categorize args * add cmake * missing climits * missing cstdarg * common : more explicit includes * fix build * refactor gpt_params_parse * update server readme * fix test --------- Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
arthw
pushed a commit
to arthw/llama.cpp
that referenced
this pull request
Nov 18, 2024
* common : move arg parser to arg.cpp * better categorize args * add cmake * missing climits * missing cstdarg * common : more explicit includes * fix build * refactor gpt_params_parse * update server readme * fix test --------- Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
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.
Ref comment: #9308 (comment)
In this PR:
arg.cppandarg.hset_sparam()to mark a specific arg as "sampling param"llama-lookupandllama-parallel)(Tested) Build time is not increased compared to master branch.