Skip to content
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

Error: too few arguments to function ‘CUresult cuGraphInstantiate_v2' #12145

Open
sanchit-grover-intel opened this issue Dec 12, 2023 · 2 comments
Labels
bug Something isn't working cuda CUDA back-end

Comments

@sanchit-grover-intel
Copy link

I am trying to build LLVM from source in an openSUSE container and I am getting the following error:

[3393/3692] Building CXX object _deps/unified-runtime-build/source/adapters/cuda/CMakeFiles/ur_adapter_cuda.dir/command_buffer.cpp.o
FAILED: _deps/unified-runtime-build/source/adapters/cuda/CMakeFiles/ur_adapter_cuda.dir/command_buffer.cpp.o
/usr/bin/c++ -DUMF_ENABLE_POOL_TRACKING -DUR_VALIDATION_LAYER_SUPPORTED_VERSION=\"0\" -DUR_VERSION=\"0\" -D_DEBUG -D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Dur_adapter_cuda_EXPORTS -I/tmp/llvm-2023-WW46/build/_deps/unified-runtime-build/source/adapters/cuda -I/tmp/llvm-2023-WW46/build/_deps/unified-runtime-src/source/adapters/cuda -I/tmp/llvm-2023-WW46/build/include -I/tmp/llvm-2023-WW46/llvm/include -I/tmp/llvm-2023-WW46/build/_deps/unified-runtime-src/source/adapters/cuda/../.. -I/tmp/llvm-2023-WW46/build/_deps/unified-runtime-src/include -I/tmp/llvm-2023-WW46/build/_deps/unified-runtime-src/source/common -I/tmp/llvm-2023-WW46/build/_deps/unified-runtime-src/source/common/unified_malloc_framework/include -I/tmp/llvm-2023-WW46/build/_deps/unified-runtime-src/source/common/umf_pools -isystem /usr/local/cuda/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -Wextra -Wno-deprecated-declarations -Wno-error -O3 -DNDEBUG -std=c++1z -fPIC -UNDEBUG -fPIC -Wall -Wpedantic -fdiagnostics-color=always -MD -MT _deps/unified-runtime-build/source/adapters/cuda/CMakeFiles/ur_adapter_cuda.dir/command_buffer.cpp.o -MF _deps/unified-runtime-build/source/adapters/cuda/CMakeFiles/ur_adapter_cuda.dir/command_buffer.cpp.o.d -o _deps/unified-runtime-build/source/adapters/cuda/CMakeFiles/ur_adapter_cuda.dir/command_buffer.cpp.o -c /tmp/llvm-2023-WW46/build/_deps/unified-runtime-src/source/adapters/cuda/command_buffer.cpp
In file included from /tmp/llvm-2023-WW46/build/_deps/unified-runtime-src/source/adapters/cuda/context.hpp:20:0,
                 from /tmp/llvm-2023-WW46/build/_deps/unified-runtime-src/source/adapters/cuda/command_buffer.hpp:14,
                 from /tmp/llvm-2023-WW46/build/_deps/unified-runtime-src/source/adapters/cuda/command_buffer.cpp:11:
/tmp/llvm-2023-WW46/build/_deps/unified-runtime-src/source/adapters/cuda/command_buffer.cpp: In function ‘ur_result_t urCommandBufferFinalizeExp(ur_exp_command_buffer_handle_t)’:
/tmp/llvm-2023-WW46/build/_deps/unified-runtime-src/source/adapters/cuda/command_buffer.cpp:144:67: error: too few arguments to function ‘CUresult cuGraphInstantiate_v2(CUgraphExec_st**, CUgraph, CUgraphNode_st**, char*, size_t)’
                                       hCommandBuffer->CudaGraph, 0));
                                                                   ^
/tmp/llvm-2023-WW46/build/_deps/unified-runtime-src/source/adapters/cuda/common.hpp:31:16: note: in definition of macro ‘UR_CHECK_ERROR’
   checkErrorUR(Result, __func__, __LINE__, __FILE__)
                ^~~~~~
In file included from /tmp/llvm-2023-WW46/build/_deps/unified-runtime-src/source/adapters/cuda/context.hpp:12:0,
                 from /tmp/llvm-2023-WW46/build/_deps/unified-runtime-src/source/adapters/cuda/command_buffer.hpp:14,
                 from /tmp/llvm-2023-WW46/build/_deps/unified-runtime-src/source/adapters/cuda/command_buffer.cpp:11:
/usr/local/cuda/include/cuda.h:17028:18: note: declared here
 CUresult CUDAAPI cuGraphInstantiate(CUgraphExec *phGraphExec, CUgraph hGraph, CUgraphNode *phErrorNode, char *logBuffer, size_t bufferSize);

This is the build command that is being used:

python ./buildbot/configure.py \
    --cuda \
    --cmake-opt=-DCMAKE_PREFIX_PATH=/usr/local/cuda/lib64/stubs \
    --cmake-opt=-DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda \
    --cmake-opt=-DCMAKE_INSTALL_PREFIX=/usr/local/llvm && \
 python ./buildbot/compile.py

When building the tag 2023-WW46, I get this error for CUDA 11.4 and 11.7 but not for 12.2. When using 2023-WW13, this error is not encountered. Does the newer LLVM tag not support older CUDA versions?

@sanchit-grover-intel sanchit-grover-intel added the bug Something isn't working label Dec 12, 2023
@EwanC
Copy link
Contributor

EwanC commented Dec 12, 2023

The PRs that are intended to fix this that have been merged are:

@maarquitos14 maarquitos14 added the cuda CUDA back-end label Dec 12, 2023
@sanchit-grover-intel
Copy link
Author

Thank you @EwanC for the clarification. I was able to successfully build with a recent nightly build. May I know if there is going to be a release soon (this year perhaps) that will include this fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cuda CUDA back-end
Projects
None yet
Development

No branches or pull requests

3 participants