fix(ci): use DEBUG=1 instead of sed to avoid EXLA OOM
Replace fragile sed -i s/-O3/-O0/g with DEBUG=1 env var. EXLA's Makefile natively checks ifdef DEBUG and uses -g (debug symbols) instead of -O3 (heavy optimization), avoiding the g++ OOM kill on CI runners. Also set EXLA_CPU_ONLY=1 to skip unnecessary nvcc probing.
This commit is contained in:
parent
a0aa6f0986
commit
845f23b093
1 changed files with 4 additions and 3 deletions
|
|
@ -38,10 +38,11 @@ RUN mkdir -p /tmp/exla_warm/config && \
|
|||
printf 'import Config\nconfig :nx, :default_backend, EXLA.Backend\nconfig :exla, :make_args, ["-j1"]\n' > /tmp/exla_warm/config/config.exs
|
||||
|
||||
# Compile all deps. EXLA's Makefile defaults to -O3 which OOM-kills g++
|
||||
# on low-memory CI runners. Patch it to -O0 before compilation.
|
||||
# on low-memory CI runners. Set DEBUG=1 so the Makefile uses -g
|
||||
# (debug symbols, low compile-time memory) instead of -O3 (heavy
|
||||
# optimization passes). Also set EXLA_CPU_ONLY=1 to skip nvcc probing.
|
||||
RUN mix deps.get && \
|
||||
sed -i 's/-O3/-O0/g' deps/exla/Makefile && \
|
||||
mix deps.compile
|
||||
DEBUG=1 EXLA_CPU_ONLY=1 mix deps.compile
|
||||
|
||||
# Save the full build cache (libexla.so + .o files + xla_extension lib)
|
||||
# so Make finds all targets already built when restored in the test step.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue