Skip to content

[HINT] Add Triton v3.2.x hint manager #384

[HINT] Add Triton v3.2.x hint manager

[HINT] Add Triton v3.2.x hint manager #384

name: Ascend-Build-And-Test
on:
push:
branches: [ "triton_v3.2.x" ]
pull_request:
branches: [ "triton_v3.2.x" ]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
ascend-build-and-test:
runs-on: flagtree-ascend
if: ${{ github.repository == 'FlagTree/flagtree' || github.repository == 'flagos-ai/flagtree' }}
steps:
- name: Setup environment
shell: bash
run: |
source ~/env.sh
env | grep -E '^(http_proxy|https_proxy|all_proxy|no_proxy)=' >> $GITHUB_ENV || true
- name: Smart Checkout
uses: flagos-ai/FlagTree/.github/actions/smart-checkout@main
with:
checkout_version: 'v6'
- name: Check if only docs files changed
id: check_files
uses: flagos-ai/FlagTree/.github/actions/check-docs-only@main
- name: FlagTree Build on Ascend
if: steps.check_files.outputs.only_docs_changed != 'true'
shell: bash
run: |
set -x
export FLAGTREE_BACKEND=ascend
source ~/env.sh
cd python
MAX_JOBS=32 python3 -m pip install . --no-build-isolation
- name: FlagTree Test on Ascend
if: steps.check_files.outputs.only_docs_changed != 'true'
shell: bash
run: |
set -x
source /usr/local/Ascend/ascend-toolkit/set_env.sh
# tutorials
pushd third_party/ascend/tutorials
python3 01-vector-add.py
python3 02-fused-softmax.py
python3 03-layer-norm.py
python3 04-fused-attention.py
python3 05-matrix-multiplication.py
python3 06-demo-autotune.py
python3 07-profiler.py
python3 08-demo-libentry.py
python3 09-gather.py >output-09-gather.log
python3 10-gather_sorted.py >output-10-gather_sorted.log
python3 11-rab_time.py
#python3 12-hstu_attention.py
python3 13-matrix-multiplication-optimized.py
python3 14-accuracy-comparison.py
#python3 15-embedding_gather_demo.py
popd
# pytest_ut
pushd third_party/ascend/unittest/pytest_ut
python3 -m pytest . \
--ignore=test_add_mindspore.py \
--ignore=test_softmax_mindspore.py \
--ignore=test_assume.py \
--ignore=test_index_select.py
popd
# flagtree tle test
pushd python/test/tle
python3 test_vec_add.py
python3 test_vec_add_2d.py
python3 test_vec_add_mix.py
python3 test_vec_mathOps.py
python3 test_tle_with_hints.py
popd
- name: FlagTree Editable Build And Test on Ascend
if: steps.check_files.outputs.only_docs_changed != 'true'
shell: bash
run: |
set -x
export FLAGTREE_BACKEND=ascend
source ~/env.sh
python3 -m pip uninstall flagtree -y
pushd python
MAX_JOBS=32 python3 -m pip install -e . --no-build-isolation
popd
source /usr/local/Ascend/ascend-toolkit/set_env.sh
python3 -c "import triton"
python3 -m pip uninstall flagtree -y