Skip to content

Commit a55d765

Browse files
committed
make cuda happy, as it dosent support calling host constexpr functions in device code, even though that should not be a problem.
1 parent 888ffc8 commit a55d765

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ggml/src/ggml-cuda/mmvq.cu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ static __host__ int get_device_table_id(int cc)
6969
return 0;
7070
}
7171

72-
static constexpr int calc_nwarps(int ncols_y, int table_id)
72+
static constexpr __host__ __device__ int calc_nwarps(int ncols_y, int table_id)
7373
{
7474
if (table_id == 0) {
7575
switch (ncols_y) {
@@ -104,7 +104,7 @@ static constexpr int calc_nwarps(int ncols_y, int table_id)
104104
return 1;
105105
}
106106

107-
static constexpr int calc_rows_per_block(int ncols_y, int table_id)
107+
static constexpr __host__ __device__ int calc_rows_per_block(int ncols_y, int table_id)
108108
{
109109
if (table_id == 0 || table_id == 1) {
110110
switch (ncols_y) {

0 commit comments

Comments
 (0)