-
Notifications
You must be signed in to change notification settings - Fork 10k
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
common : move arg parser code to arg.cpp
#9388
Conversation
else { | ||
throw std::invalid_argument("invalid value"); | ||
} | ||
#ifndef GGML_USE_CUDA_SYCL_VULKAN |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this #ifndef
is working as intended
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you suggest a patch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Upon review, it looks like the macro is already in common.cpp. Maybe it needs to be moved to the header file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes we can move it here. However, the naming is quite misleading, so I'd suggest not to abstract it:
#ifndef GGML_USE_CUDA_SYCL_VULKAN | |
#if (!defined(GGML_USE_CUDA) && !defined(GGML_USE_SYCL)) && !defined(GGML_USE_VULKAN) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please have a look at the PR: #9411
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
Ref comment: #9308 (comment)
In this PR:
arg.cpp
andarg.h
set_sparam()
to mark a specific arg as "sampling param"llama-lookup
andllama-parallel
)(Tested) Build time is not increased compared to master branch.