Skip to content

Commit 7a27eac

Browse files
committed
Fix to use artifacts from previous pipeline step for the precompiled kernels
1 parent 375ca18 commit 7a27eac

File tree

1 file changed

+20
-16
lines changed

1 file changed

+20
-16
lines changed

scripts/task_test_blackwell_kernels.sh

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,28 @@ if [[ "$1" == "--dry-run" ]] || [[ "${DRY_RUN}" == "true" ]]; then
2525
fi
2626

2727
if [ "$DRY_RUN" != "true" ]; then
28-
# Detect CUDA stream from CUDA_VERSION (e.g., 13.0.1 -> 13.0 -> cu130)
29-
if [ -z "${CUDA_STREAM}" ]; then
30-
CUDA_NUM=$(echo "${CUDA_VERSION}" | sed -E 's/^([0-9]+\.[0-9]+).*/\1/')
31-
case "${CUDA_NUM}" in
32-
12.8) CUDA_STREAM=cu128 ;;
33-
12.9) CUDA_STREAM=cu129 ;;
34-
13.0) CUDA_STREAM=cu130 ;;
35-
*) CUDA_STREAM=cu129 ;;
36-
esac
37-
fi
38-
echo "Using CUDA stream: ${CUDA_STREAM}"
28+
echo "Using CUDA version: ${CUDA_VERSION}"
3929
echo ""
4030

41-
# Install precompiled kernels
42-
echo "Installing flashinfer-cubin from PyPI/index..."
43-
pip install -q flashinfer-cubin
44-
echo "Installing flashinfer-jit-cache for ${CUDA_STREAM} from https://flashinfer.ai/whl/${CUDA_STREAM} ..."
45-
pip install -q --extra-index-url "https://flashinfer.ai/whl/${CUDA_STREAM}" flashinfer-jit-cache
31+
# Install precompiled kernels (require CI build artifacts)
32+
: ${DIST_CUBIN_DIR:="../dist/${CUDA_VERSION}/cubin"}
33+
: ${DIST_JIT_CACHE_DIR:="../dist/${CUDA_VERSION}/jit-cache"}
34+
35+
if [ -d "${DIST_CUBIN_DIR}" ] && ls "${DIST_CUBIN_DIR}"/*.whl >/dev/null 2>&1; then
36+
echo "Installing flashinfer-cubin from ${DIST_CUBIN_DIR} ..."
37+
pip install -q "${DIST_CUBIN_DIR}"/*.whl
38+
else
39+
echo "ERROR: flashinfer-cubin wheel not found in ${DIST_CUBIN_DIR}. Ensure the CI build stage produced the artifact." >&2
40+
exit 1
41+
fi
42+
43+
if [ -d "${DIST_JIT_CACHE_DIR}" ] && ls "${DIST_JIT_CACHE_DIR}"/*.whl >/dev/null 2>&1; then
44+
echo "Installing flashinfer-jit-cache from ${DIST_JIT_CACHE_DIR} ..."
45+
pip install -q "${DIST_JIT_CACHE_DIR}"/*.whl
46+
else
47+
echo "ERROR: flashinfer-jit-cache wheel not found in ${DIST_JIT_CACHE_DIR} for ${CUDA_VERSION}. Ensure the CI build stage produced the artifact." >&2
48+
exit 1
49+
fi
4650
echo ""
4751

4852
# Install local python sources

0 commit comments

Comments
 (0)