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

compatibility with Jetson Nano #1345

Closed
jobesu14 opened this issue Jun 27, 2020 · 2 comments
Closed

compatibility with Jetson Nano #1345

jobesu14 opened this issue Jun 27, 2020 · 2 comments
Assignees
Labels
potential bug Something that looks like a bug but not yet confirmed

Comments

@jobesu14
Copy link

I built taichi on the Jetson Nano successfully (after doing that modif on taichi-dev/glfw repo) with the following cmake command:
cmake .. -DCMAKE_C_COMPILER=clang-8 -DCMAKE_CXX_COMPILER=clang-8 -DCUDA_VERSION=10.0 -DTI_WITH_CUDA:BOOL=True

When I try the to run the fractal.py example (or any other example) I get this runtime error (both with archi==ti.cpu or archi==ti.gpu):

jetbot@jetson-4-3:~/dev/taichi/examples$ python3 fractal.py 
[Taichi] mode=development
[Taichi] preparing sandbox at /tmp/taichi-j3ui2gqi
[Taichi] <dev mode>, llvm 8.0.1, commit 477b1e1d, python 3.6.9
[Taichi] Starting on arch=arm64
[E 06/26/20 21:56:23.972] [jit_cpu.cpp:create_llvm_jit_session_cpu@373] LLVM TargetMachineBuilder has failed when getting data layout.


***********************************
* Taichi Compiler Stack Traceback *
***********************************
/tmp/taichi-j3ui2gqi/taichi_core.so: taichi::Logger::error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)
/tmp/taichi-j3ui2gqi/taichi_core.so: taichi::lang::create_llvm_jit_session_cpu(taichi::lang::Arch)
/tmp/taichi-j3ui2gqi/taichi_core.so: taichi::lang::TaichiLLVMContext::TaichiLLVMContext(taichi::lang::Arch)
/tmp/taichi-j3ui2gqi/taichi_core.so: taichi::lang::Program::Program(taichi::lang::Arch)
/tmp/taichi-j3ui2gqi/taichi_core.so(+0x74c24c) [0x7fa809324c]
/tmp/taichi-j3ui2gqi/taichi_core.so(+0x6156e4) [0x7fa7f5c6e4]
python3(_PyCFunction_FastCallDict+0x1ac) [0x5b9b2c]
python3(_PyObject_FastCallDict+0x1c0) [0x6058d0]
python3() [0x5f2bcc]
python3(PyObject_Call+0x50) [0x606c40]
python3() [0x595cd8]
python3() [0x5a52b4]
python3(_PyObject_FastCallDict+0xd0) [0x6057e0]
python3() [0x529738]
python3(_PyEval_EvalFrameDefault+0x4770) [0x52e5a8]
python3() [0x527860]
python3() [0x5297dc]
python3(_PyEval_EvalFrameDefault+0x4770) [0x52e5a8]
python3() [0x528ff0]
python3() [0x529584]
python3() [0x5297dc]
python3(_PyEval_EvalFrameDefault+0x49c8) [0x52e800]
python3() [0x528ff0]
python3(PyRun_FileExFlags+0x118) [0x630438]
python3(PyRun_SimpleFileExFlags+0xfc) [0x635acc]
python3(Py_Main+0xe78) [0x6202c8]
python3(main+0x1cc) [0x420d3c]
/lib/aarch64-linux-gnu/libc.so.6: __libc_start_main
python3() [0x420e94]

Internal Error occurred, check this page for possible solutions:
https://taichi.readthedocs.io/en/stable/install.html#troubleshooting
Expected<T> must be checked before access or destruction.
Unchecked Expected<T> contained error:
Unable to find target for this triple (no targets are registered)[E 06/26/20 21:56:23.978] Received signal 6 (Aborted)


***********************************
* Taichi Compiler Stack Traceback *
***********************************
/tmp/taichi-j3ui2gqi/taichi_core.so: taichi::Logger::error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)
/tmp/taichi-j3ui2gqi/taichi_core.so: taichi::signal_handler(int)
linux-vdso.so.1(__kernel_rt_sigreturn+0) [0x7fac0cb6c0]
/lib/aarch64-linux-gnu/libc.so.6: raise

Internal Error occurred, check this page for possible solutions:
https://taichi.readthedocs.io/en/stable/install.html#troubleshooting

The issue seems to come from that line in jit_cpu.cpp@371: auto data_layout = jtmb->getDefaultDataLayoutForTarget();
That returns the errors message: Unable to find target for this triple (no targets are registered)
I printed the triple that jtmb return: aarch64-unknown-linux-gnu which seems to be fine...

I saw in this closed issue that @hgnan has successfully built and run Taichi on Jetson Nano for Taichi v0.3.x...

I'd be happy to help debug if needed.

@jobesu14 jobesu14 added the potential bug Something that looks like a bug but not yet confirmed label Jun 27, 2020
@archibate
Copy link
Collaborator

Hi, thank for purposing this! But @yuanming-hu seems to be busy with his online lecture these days. I'm willing to help, but I don't have much knowledge on the LLVM backend.. sorry. If you found the solution, feel free to open a PR and request @yuanming-hu for review.

@bobcao3
Copy link
Collaborator

bobcao3 commented Apr 14, 2022

Redirecting this issue to #4711

@bobcao3 bobcao3 closed this as completed Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
potential bug Something that looks like a bug but not yet confirmed
Projects
None yet
Development

No branches or pull requests

5 participants