-
Notifications
You must be signed in to change notification settings - Fork 74
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
[HIPIFY] clang_cuda_runtime_wrapper.h:41:10: fatal error: 'cmath' file not found #983
Comments
Could you share your source snippet and the command line of the hipify-clang invocation, please? |
The command i am execting ==> hipify-clang /darknet/src/avgpool_layer_kernels.cu --cuda-path=/usr/local/cuda-12.2 -I /usr/local/cuda-12.2/samples/common/inc -I/darknet/include/ avgpool_layer_kernels.cu is _#include "gpu.hpp" #include "avgpool_layer.h" global void forward_avgpool_layer_kernel(int n, int w, int h, int c, float *input, float output)
} global void backward_avgpool_layer_kernel(int n, int w, int h, int c, float *in_delta, float out_delta)
} extern "C" void forward_avgpool_layer_gpu(avgpool_layer layer, network_state state)
} extern "C" void backward_avgpool_layer_gpu(avgpool_layer layer, network_state state)
} "_ |
The latest CUDA partially supported by clang in ROCm 5.6.0 is 12.1.0, but better to use CUDA 11.8 with ROCm 5.6. CUDA 12.2.x is partially supported by the trunk clang. You may build hipify-clang against trunk LLVM/clang and then use it against CUDA 12.2.x sources or wait for CUDA 12.2.x support in the next ROCm releases. |
Sure. will try with CUDA 11.8. |
getting following error: $ hipify-clang /darknet/src/avgpool_layer_kernels.cu --cuda-path=/usr/local/cuda-11 -I /usr/local/cuda-11/samples/common/include -I /usr/lib/llvm-16/lib/clang/16/include/cuda_wrappers -I /usr/include/c++/11 -I /usr/include/x86_64-linux-gnu/c++/11 -I /darknet/include/ -o avgpool_layer_kernels.cpp warning: CUDA version 11.8 is only partially supported [-Wunknown-cuda-version] |
You need to add the |
Closing as answered. |
Hi,
i am getting following error. Could you please suggest me what i am missing
error:
warning: CUDA version is newer than the latest partially supported version 11.8 [-Wunknown-cuda-version]
In file included from :1:
/opt/rocm-5.6.0/bin/../include/hipify/__clang_cuda_runtime_wrapper.h:41:10: fatal error: 'cmath' file not found
#include
^~~~~~~
#0 0x00000000023c3016 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/rocm-5.6.0/bin/hipify-clang+0x23c3016)
#1 0x00000000023c0914 SignalHandler(int) Signals.cpp:0:0
#2 0x00007f646e607520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#3 0x0000000000a12510 (anonymous namespace)::PPCallbackProxy::InclusionDirective(clang::SourceLocation, clang::Token const&, llvm::StringRef, bool, clang::CharSourceRange, clang::CustomizableOptionalclang::FileEntryRef, llvm::StringRef, llvm::StringRef, clang::Module const*, clang ::SrcMgr::CharacteristicKind) HipifyAction.cpp:0:0
#4 0x00000000019b74f1 clang::PPChainedCallbacks::InclusionDirective(clang::SourceLocation, clang::Token const&, llvm::StringRef, bool, clang: :CharSourceRange, clang::CustomizableOptionalclang::FileEntryRef, llvm::StringRef, llvm::StringRef, clang::Module const*, clang::SrcMgr::Cha racteristicKind) PPCallbacks.cpp:0:0
#5 0x00000000019c8016 clang::Preprocessor::HandleHeaderIncludeOrImport(clang::SourceLocation, clang::Token&, clang::Token&, clang::SourceLoca tion, clang::detail::SearchDirIteratorImpl, clang::FileEntry const*) (/opt/rocm-5.6.0/bin/hipify-clang+0x19c8016)
#6 0x00000000019c9881 clang::Preprocessor::HandleIncludeDirective(clang::SourceLocation, clang::Token&, clang::detail::SearchDirIteratorImpl< true>, clang::FileEntry const*) (/opt/rocm-5.6.0/bin/hipify-clang+0x19c9881)
#7 0x00000000019ca6b8 clang::Preprocessor::HandleDirective(clang::Token&) (/opt/rocm-5.6.0/bin/hipify-clang+0x19ca6b8)
#8 0x0000000001984a6d clang::Lexer::LexTokenInternal(clang::Token&, bool) (/opt/rocm-5.6.0/bin/hipify-clang+0x1984a6d)
#9 0x0000000001a03f37 clang::Preprocessor::Lex(clang::Token&) (/opt/rocm-5.6.0/bin/hipify-clang+0x1a03f37)
#10 0x0000000000bea1af clang::Parser::ConsumeBrace() Parser.cpp:0:0
#11 0x0000000000bf69f2 clang::BalancedDelimiterTracker::consumeClose() Parser.cpp:0:0
#12 0x0000000000c792d6 clang::Parser::ParseNamespace(clang::DeclaratorContext, clang::SourceLocation&, clang::SourceLocation) (/opt/rocm-5.6.0 /bin/hipify-clang+0xc792d6)
#13 0x0000000000c5e635 clang::Parser::ParseDeclaration(clang::DeclaratorContext, clang::SourceLocation&, clang::ParsedAttributes&, clang::Pars edAttributes&, clang::SourceLocation*) (/opt/rocm-5.6.0/bin/hipify-clang+0xc5e635)
#14 0x0000000000bf77e7 clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) (/ opt/rocm-5.6.0/bin/hipify-clang+0xbf77e7)
#15 0x0000000000bf90a6 clang::Parser::ParseTopLevelDecl(clang::OpaquePtrclang::DeclGroupRef&, clang::Sema::ModuleImportState&) (/opt/rocm-5. 6.0/bin/hipify-clang+0xbf90a6)
#16 0x0000000000be9bca clang::ParseAST(clang::Sema&, bool, bool) (/opt/rocm-5.6.0/bin/hipify-clang+0xbe9bca)
#17 0x0000000000a12343 HipifyAction::ExecuteAction() (/opt/rocm-5.6.0/bin/hipify-clang+0xa12343)
#18 0x0000000000a7e259 clang::FrontendAction::Execute() (/opt/rocm-5.6.0/bin/hipify-clang+0xa7e259)
#19 0x0000000000a928b1 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/rocm-5.6.0/bin/hipify-clang+0xa928b1)
#20 0x0000000000be9334 clang::tooling::FrontendActionFactory::runInvocation(std::shared_ptrclang::CompilerInvocation, clang::FileManager*, s td::shared_ptrclang::PCHContainerOperations, clang::DiagnosticConsumer*) (/opt/rocm-5.6.0/bin/hipify-clang+0xbe9334)
#21 0x0000000000be21f5 clang::tooling::ToolInvocation::runInvocation(char const*, clang::driver::Compilation*, std::shared_ptr<clang::Compiler Invocation>, std::shared_ptrclang::PCHContainerOperations) (/opt/rocm-5.6.0/bin/hipify-clang+0xbe21f5)
#22 0x0000000000be5588 clang::tooling::ToolInvocation::run() (/opt/rocm-5.6.0/bin/hipify-clang+0xbe5588)
#23 0x0000000000be77a0 clang::tooling::ClangTool::run(clang::tooling::ToolAction*) (/opt/rocm-5.6.0/bin/hipify-clang+0xbe77a0)
#24 0x0000000000bdf8c7 clang::tooling::RefactoringTool::runAndSave(clang::tooling::FrontendActionFactory*) (/opt/rocm-5.6.0/bin/hipify-clang+0 xbdf8c7)
#25 0x0000000000a26ebf main (/opt/rocm-5.6.0/bin/hipify-clang+0xa26ebf)
#26 0x00007f646e5eed90 __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#27 0x00007f646e5eee40 call_init ./csu/../csu/libc-start.c:128:20
#28 0x00007f646e5eee40 __libc_start_main ./csu/../csu/libc-start.c:379:5
#29 0x00000000009c7265 _start (/opt/rocm-5.6.0/bin/hipify-clang+0x9c7265)
Segmentation fault (core dumped)
The text was updated successfully, but these errors were encountered: