digitsu

digitsu

Trying to get EXLA working on Jetson Orin AGX box with CUDA 11.8

I’ve been trying for the past week to get a running version of Livebook on a Jetson Orin AGX box (integrated GPUs) The box only has CUDA version 11.8 and 11.4 installed.

Whenever I try to run the EXLA tests to just ensure basic CUDA works, I get this error:

dave@CHCHE-ORIN-01:~/work/nx/exla$ mix test
Using libexla.so from /home/dave/.cache/xla/exla/elixir-1.17.2-erts-14.2.5-xla-0.5.1-exla-0.6.4-6c7e3kyqmrq4l2ogbwoouzxmw4/libexla.so
make: '/home/dave/work/nx/exla/_build/test/lib/exla/priv/libexla.so' is up to date.

08:37:06.137 [info] domain=elixir.xla file=xla/stream_executor/cuda/cuda_gpu_executor.cc line=880  could not open file to read NUMA node: /sys/bus/pci/devices/0000:00:00.0/numa_node
Your kernel may have been built without NUMA support.

08:37:06.145 [info] domain=elixir.xla file=xla/service/service.cc line=168  XLA service 0xffff54002c80 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:

08:37:06.146 [info] domain=elixir.xla file=xla/service/service.cc line=176    StreamExecutor device (0): Orin, Compute Capability 8.7

08:37:06.146 [info] domain=elixir.xla file=xla/pjrt/gpu/se_gpu_pjrt_client.cc line=633  Using BFC allocator.

08:37:06.146 [info] domain=elixir.xla file=xla/pjrt/gpu/gpu_helpers.cc line=105  XLA backend allocating 25646193049 bytes on device 0 for BFCAllocator.
Running ExUnit with seed: 164975, max_cases: 16
Excluding tags: [:platform, :integration, :multi_device, :conditional_inside_map_reduce]
Including tags: [platform: :cuda]
  2) test range randint (EXLA.NxRandomTest)
     test/exla/random_test.exs:10
     ** (RuntimeError) Failed to execute XLA Runtime executable: run time error: custom call 'xla.gpu.func.launch' failed: Failed to get stream's capture status: the provided PTX was compiled with an unsupported toolchain.; current tracing scope: fusion; current profiling annotation: XlaModule:#hlo_module=_Function_20.55097802_1_in_Nx.Random.___defn_key____.12,program_id=5#.
     code: key = Nx.Random.key(127)
     stacktrace:
       (exla 0.6.4) lib/exla/executable.ex:56: EXLA.Executable.unwrap!/1
       (exla 0.6.4) lib/exla/executable.ex:19: EXLA.Executable.run/3
       (exla 0.6.4) lib/exla/defn.ex:346: EXLA.Defn.maybe_outfeed/7
       (stdlib 5.2.3) timer.erl:270: :timer.tc/2
       (exla 0.6.4) lib/exla/defn.ex:283: anonymous fn/7 in EXLA.Defn.__compile__/4
       (nx 0.6.4) lib/nx/defn.ex:443: Nx.Defn.do_jit_apply/3
       test/exla/random_test.exs:11: (test)


08:37:14.783 [warning] domain=elixir.xla file=xla/service/gpu/runtime/support.cc line=58  Intercepted XLA runtime error:
INTERNAL: Failed to get stream's capture status: the provided PTX was compiled with an unsupported toolchain.

08:37:14.783 [error] domain=elixir.xla file=xla/pjrt/pjrt_stream_executor_client.cc line=2614  Execution of replica 0 failed: INTERNAL: Failed to execute XLA Runtime executable: run time error: custom call 'xla.gpu.func.launch' failed: Failed to get stream's capture status: the provided PTX was compiled with an unsupported toolchain.; current tracing scope: add; current profiling annotation: XlaModule:#hlo_module=test.5,program_id=0#.

I set XLA_BUILD=true so that it actually builds XLA first.
I managed to get XLA to build (with bazel) but this doesn’t seem to fix this “PTX” mismatch issue.

I’m hoping it is just some config env var or build env var that I’m setting wrong that is causing this.

for context here is my env vars I have set that are relevant:

export PATH=/usr/local/cuda-11.8/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-11.8/lib64:$LD_LIBRARY_PATH
export XLA_FLAGS=--xla_gpu_cuda_data_dir=/usr/local/cuda-11.8
export XLA_TARGET=cuda
export EXLA_TARGET=cuda
export XLA_BUILD=true
export TMP=/var/tmp
export TF_CUDA_VERSION='11.8'

First Post!

jonatanklosko

jonatanklosko

Creator of Livebook

Please try nx/exla main, it uses a much more recent version of XLA : )

Where Next?

Popular in Questions Top

lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
JDanielMartinez
Hi! May someone helps me, please! I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
itssasanka
Hi all, Trying to get some more clarity over utc_datetime and naive_datetime for Ecto: https://hexdocs.pm/ecto/Ecto.Schema.html#module-...
New
chensan
I have a User schema with a :from_id field set to type :string: defmodule TweetBot.Repo.Migrations.CreateUsers do use Ecto.Migration ...
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
wernerlaude
In AR this is so simple @articles = current_user.articles How to do in Ecto? def index(conn, _params) do current_user = conn.assig...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers' Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
jc00ke
Expanding on this topic: https://forum.elixirforum.net/t/map-typespec-question/19217 Let’s say I have a map with required and optional k...
New

Other popular topics Top

sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
977 41022 311
New
William
I would like to know that is there any online source for learning Phoenix Framework for building E-Commerce Store? Any advantage on build...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 49522 488
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
chrismccord
As promised, the first release candidate of Phoenix 1.3.0 is out! This release focuses on code generators with improved project structure...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
qwerescape
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
AstonJ
We’ve put together this wiki for Phoenix LiveView - please feel free to add any info you feel is worth including. What is Phoenix LiveV...
New

We're in Beta

About us Mission Statement