Skip to content

linux build issue: no matching function for call to 'hipStreamWaitEvent' #150

@robey

Description

@robey

current linux builds fail. this is ubuntu 25.10 with rocm installed from https://rocm.docs.amd.com/projects/install-on-linux/en/latest/install/quick-start.html:

/opt/rocm/llvm/bin/clang++ -I. -Iggml/include -Iggml/src -Iinclude -Isrc -I./common -I./include -I./include/CL -I./otherarch -I./otherarch/tools -I./otherarch/sdcpp -I./otherarch/sdcpp/thirdparty -I./include/vulkan -O3 -fno-finite-math-only  -DNDEBUG -std=c++17 -fPIC -DLOG_DISABLE_LOGS -D_GNU_SOURCE -DGGML_USE_LLAMAFILE -DGGML_HIP_ROCWMMA_FATTN -I/opt/rocm/include/rocwmma/ -DGGML_USE_HIP -DGGML_HIP_NO_VMM -DGGML_USE_CUDA -DSD_USE_CUDA  -D__HIP_PLATFORM_HCC__= -D__HIP_PLATFORM_AMD__= -I/opt/rocm-7.1.1/include -I/include --offload-arch=gfx1102 --offload-arch=gfx1103 -x hip -c -o ggml-cuda.o ggml/src/ggml-cuda/ggml-cuda.cu
ggml/src/ggml-cuda/ggml-cuda.cu:154:19: warning: variable length arrays in C++ are a Clang extension [-Wvla-cxx-extension]
  154 |     char archName[archLen + 1];
      |                   ^~~~~~~~~~~
ggml/src/ggml-cuda/ggml-cuda.cu:154:19: note: read of non-const variable 'archLen' is not allowed in a constant expression
ggml/src/ggml-cuda/ggml-cuda.cu:153:9: note: declared here
  153 |     int archLen = strlen(devName);
      |         ^
ggml/src/ggml-cuda/ggml-cuda.cu:388:13: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
  388 |             cudaFree(ptr);
      |             ^~~~~~~~ ~~~
ggml/src/ggml-cuda/vendors/hip.h:62:18: note: expanded from macro 'cudaFree'
   62 | #define cudaFree hipFree
      |                  ^~~~~~~
ggml/src/ggml-cuda/ggml-cuda.cu:3252:28: error: no matching function for call to 'hipStreamWaitEvent'
 3252 |                 CUDA_CHECK(cudaStreamWaitEvent(stream, concurrent_event->fork_event));
      |                            ^~~~~~~~~~~~~~~~~~~
ggml/src/ggml-cuda/vendors/hip.h:112:29: note: expanded from macro 'cudaStreamWaitEvent'
  112 | #define cudaStreamWaitEvent hipStreamWaitEvent
      |                             ^~~~~~~~~~~~~~~~~~
ggml/src/ggml-cuda/common.cuh:164:40: note: expanded from macro 'CUDA_CHECK'
  164 | #define CUDA_CHECK(err) CUDA_CHECK_GEN(err, cudaSuccess, cudaGetErrorString)
      |                                        ^~~
ggml/src/ggml-cuda/common.cuh:158:22: note: expanded from macro 'CUDA_CHECK_GEN'
  158 |         auto err_ = (err);                                                          \
      |                      ^~~
/usr/include/hip/hip_runtime_api.h:2211:12: note: candidate function not viable: requires 3 arguments, but 2 were provided
 2211 | hipError_t hipStreamWaitEvent(hipStream_t stream, hipEvent_t event, unsigned int flags);
      |            ^                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ggml/src/ggml-cuda/ggml-cuda.cu:3333:40: error: no matching function for call to 'hipStreamWaitEvent'
 3333 |                             CUDA_CHECK(cudaStreamWaitEvent(cuda_ctx->stream(), concurrent_event->join_events[i - 1]));
      |                                        ^~~~~~~~~~~~~~~~~~~
ggml/src/ggml-cuda/vendors/hip.h:112:29: note: expanded from macro 'cudaStreamWaitEvent'
  112 | #define cudaStreamWaitEvent hipStreamWaitEvent
      |                             ^~~~~~~~~~~~~~~~~~
ggml/src/ggml-cuda/common.cuh:164:40: note: expanded from macro 'CUDA_CHECK'
  164 | #define CUDA_CHECK(err) CUDA_CHECK_GEN(err, cudaSuccess, cudaGetErrorString)
      |                                        ^~~
ggml/src/ggml-cuda/common.cuh:158:22: note: expanded from macro 'CUDA_CHECK_GEN'
  158 |         auto err_ = (err);                                                          \
      |                      ^~~
/usr/include/hip/hip_runtime_api.h:2211:12: note: candidate function not viable: requires 3 arguments, but 2 were provided
 2211 | hipError_t hipStreamWaitEvent(hipStream_t stream, hipEvent_t event, unsigned int flags);
      |            ^                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings and 2 errors generated when compiling for gfx1102.
make: *** [Makefile:322: ggml-cuda.o] Error 1
make: *** Waiting for unfinished jobs....

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions