Skip to content

Commit

Permalink
fix NVCC version on Makefile, __halves2half2 -> make_half2
Browse files Browse the repository at this point in the history
  • Loading branch information
slaren committed Jul 15, 2023
1 parent 83595ec commit 6bfbdf8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ ifdef LLAMA_CUDA
OBJS += ggml-cuda.o
NVCC = nvcc
NVCCFLAGS = --forward-unknown-to-host-compiler
NVCCV := $(shell $(NVCC) --version | tail -n 1)
ifdef LLAMA_DEBUG
NVCCFLAGS += -lineinfo
endif # LLAMA_DEBUG
Expand Down
2 changes: 1 addition & 1 deletion ggml-cuda-kern.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ template<> struct vec2_t_impl<float> { typedef float2 type; };
template<typename T> using vec2_t = typename vec2_t_impl<T>::type;

template<typename T> inline __host__ __device__ vec2_t<T> make_vec2_t(const T & x, const T & y);
template<> inline __host__ __device__ vec2_t<half> make_vec2_t(const half & x, const half & y) { return __halves2half2(x, y); }
template<> inline __host__ __device__ vec2_t<half> make_vec2_t(const half & x, const half & y) { return make_half2 (x, y); }
template<> inline __host__ __device__ vec2_t<float> make_vec2_t(const float & x, const float & y) { return make_float2(x, y); }

// the cuda headers define operators for half2, but not for float2
Expand Down

0 comments on commit 6bfbdf8

Please sign in to comment.