-
Notifications
You must be signed in to change notification settings - Fork 0
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
Update Makefile for HIPBLAS #4
Conversation
Adding it to CXXFLAGS like that will define those for all of the code instead of just ggm-cuda.cu, the CUDA version uses a different variable so it is isolated, but what was the problem with target-specific variables? |
else | ||
CXXFLAGS += -DGGML_CUDA_DMMV_X=32 | ||
endif | ||
ifeq ($(LLAMA_CUDA_FORCE_DMMV), true) |
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.
We should keep it the same as the CUDA version:
ifeq ($(LLAMA_CUDA_FORCE_DMMV), true) | |
ifdef LLAMA_CUDA_FORCE_DMMV |
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.
How would using ifdef work with a true/false boolean? The upstream makefile for CuBLAS doesn't look complete or correct
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.
Well, it's usually defined to be anything to turn it on, not true
or false
.
What target-specific variables? |
It used to be: LLAMA_CUDA_DMMV_X ?= 32
ggml-cuda.o: CXXFLAGS += -DGGML_CUDA_DMMV_X=$(LLAMA_CUDA_DMMV_X) That means that when making the target ggml-cuda.o the CXXFLAGS will have these added definitions. But when making some other target, like common.o for example, these definitions will not be present. The CUDA version uses this: ifdef LLAMA_CUDA_DMMV_X
NVCCFLAGS += -DGGML_CUDA_DMMV_X=$(LLAMA_CUDA_DMMV_X)
else
NVCCFLAGS += -DGGML_CUDA_DMMV_X=32
endif # LLAMA_CUDA_DMMV_X Well, it does the same thing but in 5 lines. But the difference here is that it uses a different Make variable So maybe we can use a different variable like |
I think I got the variable changes working now except for the backwards compatibility with |
This update
Tested and working on latest build on a 6800xt