Skip to content

Commit 312ea82

Browse files
[CI][ROCm] Make hf-xet reconstruction safe on shared NFS (#49837)
Signed-off-by: Andreas Karatzas <akaratza@amd.com> Co-authored-by: OpenAI Codex <noreply@openai.com>
1 parent 394beb6 commit 312ea82

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

.buildkite/scripts/hardware_ci/run-amd-test.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@ initialize_native_environment() {
387387
local job_id="${BUILDKITE_JOB_ID:-${BUILDKITE_PARALLEL_JOB:-local}}"
388388
local job_id_suffix=""
389389
local native_root=""
390+
local hf_fstype=""
390391
local hf_mount=""
391392

392393
if [[ "$(id -u)" -ne 0 ]]; then
@@ -436,6 +437,18 @@ initialize_native_environment() {
436437
return 1
437438
fi
438439
fi
440+
441+
if command -v findmnt >/dev/null 2>&1; then
442+
hf_fstype=$(findmnt -n -T "${HF_HOME}" -o FSTYPE 2>/dev/null || true)
443+
fi
444+
if [[ "${hf_fstype}" == nfs || "${hf_fstype}" == nfs4 ]]; then
445+
# Keep hf-xet state local and avoid vectored writes on shared NFS.
446+
export HF_XET_CACHE="${native_root}/cache/hf-xet"
447+
export HF_XET_HIGH_PERFORMANCE=0
448+
export HF_XET_RECONSTRUCTION_USE_VECTORED_WRITE=0
449+
mkdir -p "${HF_XET_CACHE}" || return 1
450+
echo "Configured hf-xet for shared ${hf_fstype} cache at ${HF_HOME}"
451+
fi
439452
}
440453

441454
run_native_preflight() {

0 commit comments

Comments
 (0)