Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
13 changes: 7 additions & 6 deletions .github/workflows/nv-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ concurrency:

jobs:
nv-build-and-test:
runs-on: nv-jiuding
runs-on: flagtree-nvidia
if: ${{ github.repository == 'FlagTree/flagtree' || github.repository == 'flagos-ai/flagtree' }}
steps:
- name: Setup environment
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
pip uninstall -y triton
source ~/env.sh
cd python
MAX_JOBS=32 python3.11 -m pip install . --no-build-isolation
MAX_JOBS=32 python3 -m pip install . --no-build-isolation

- name: FlagTree Build on NVidia (triton_v3.2.x branch)
if: ${{ steps.check_files.outputs.only_docs_changed != 'true' && env.TARGET_BRANCH == 'triton_v3.2.x' }}
Expand All @@ -94,7 +94,7 @@ jobs:
pip uninstall -y triton
source ~/env-3.2.sh
cd python
MAX_JOBS=32 python3.11 -m pip install . --no-build-isolation
MAX_JOBS=32 python3 -m pip install . --no-build-isolation

- name: FlagTree Build on NVidia (triton_v3.3.x branch)
if: ${{ steps.check_files.outputs.only_docs_changed != 'true' && env.TARGET_BRANCH == 'triton_v3.3.x' }}
Expand All @@ -104,17 +104,18 @@ jobs:
pip uninstall -y triton
source ~/env-3.3.sh
cd python
MAX_JOBS=32 python3.11 -m pip install . --no-build-isolation
MAX_JOBS=32 python3 -m pip install . --no-build-isolation

- name: FlagTree Test on NVidia
if: steps.check_files.outputs.only_docs_changed != 'true'
shell: bash
run: |
set -x
python3.11 -m pytest -s python/test/unit \
python3 -m pytest -s python/test/unit \
--ignore=python/test/unit/language/test_line_info.py \
--ignore=python/test/unit/test_debug.py \
--ignore=python/test/unit/test_debug_dump.py \
--ignore=python/test/unit/tools/test_disasm.py
if [ -d "python/test/operators" ]; then
python3.11 -m pytest -s python/test/operators
python3 -m pytest -s python/test/operators
fi
41 changes: 41 additions & 0 deletions tools/sync_ascend/clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/bash

# 清理同步代码
# 警告:脚本中涉及路径的所有修改均会撤销!
#
# 用法:
# bash tools/sync_ascend/clean.sh

set -e

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

_find_git_root() {
local _dir="$1"
while [[ "${_dir}" != "/" ]]; do
[[ -e "${_dir}/.git" ]] && { echo "${_dir}"; return 0; }
_dir="$(dirname "${_dir}")"
done
return 1
}

FLAGTREE_DIR="$(_find_git_root "${SCRIPT_DIR}")" || {
echo "[ERROR] 无法从 '${SCRIPT_DIR}' 向上找到 .git 目录,请在 flagtree 项目内执行脚本。" >&2
exit 1
}

cd "${FLAGTREE_DIR}"

git stash
git clean -xdf bin/
git clean -xdf include/
git clean -xdf lib/
git clean -xdf python/
git clean -xdf test/
git clean -xdf third_party/ascend/

pushd third_party/flir/
git stash
git clean -xdf include/
git clean -xdf lib/
popd
Loading