mirror of
https://github.com/mudler/LocalAI.git
synced 2026-09-13 06:45:26 -04:00
Prefer an explicitly configured Triton assembler, otherwise use the executable ptxas from CUDA_HOME so torch.compile can target GPU architectures newer than Triton bundled tooling. Assisted-by: Codex:gpt-5 Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
19 lines
589 B
Bash
19 lines
589 B
Bash
#!/bin/bash
|
|
backend_dir=$(dirname $0)
|
|
if [ -d $backend_dir/common ]; then
|
|
source $backend_dir/common/libbackend.sh
|
|
else
|
|
source $backend_dir/../common/libbackend.sh
|
|
fi
|
|
|
|
# Editable installs record their build-time absolute source path, which becomes
|
|
# stale when the backend is relocated under /backends at install time.
|
|
export PYTHONPATH="${EDIR}/fish-speech-src${PYTHONPATH:+:${PYTHONPATH}}"
|
|
|
|
cuda_home=${CUDA_HOME:-/usr/local/cuda}
|
|
if [ -z "${TRITON_PTXAS_PATH:-}" ] && [ -x "$cuda_home/bin/ptxas" ]; then
|
|
export TRITON_PTXAS_PATH="$cuda_home/bin/ptxas"
|
|
fi
|
|
|
|
startBackend "$@"
|