Skip to content
Merged
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
6 changes: 6 additions & 0 deletions .github/workflows/aipu-delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ on:
PLATFORM:
required: true
default: 'x86_64'
FLAGTREE_PYPI_KEY:
required: false
workflow_call:
inputs:
WHL_VER:
Expand All @@ -30,6 +32,9 @@ on:
type: string
required: true
default: 'x86_64'
FLAGTREE_PYPI_KEY:
type: string
required: false

concurrency:
group: ${{ github.workflow }}-${{ inputs.WHL_VER }}-${{ inputs.PYTHON_VER }}-${{ inputs.PLATFORM }}
Expand Down Expand Up @@ -85,6 +90,7 @@ jobs:
source ~/env_setup.sh # aipu
cd python
rm -rf ./build ./*.egg-info
{ export FLAGTREE_PYPI_KEY=${{ inputs.FLAGTREE_PYPI_KEY }}; } 2>/dev/null
MAX_JOBS=32 python${PYTHON_VER} setup.py bdist_wheel -d ~/dist-flagtree
env | grep -E '^(FLAGTREE_WHEEL_VERSION)=' >> $GITHUB_ENV || true

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/ascend-delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ on:
PLATFORM:
required: true
default: 'aarch64'
FLAGTREE_PYPI_KEY:
required: false
workflow_call:
inputs:
WHL_VER:
Expand All @@ -30,6 +32,9 @@ on:
type: string
required: true
default: 'aarch64'
FLAGTREE_PYPI_KEY:
type: string
required: false

concurrency:
group: ${{ github.workflow }}-${{ inputs.WHL_VER }}-${{ inputs.PYTHON_VER }}-${{ inputs.PLATFORM }}
Expand Down Expand Up @@ -84,6 +89,7 @@ jobs:

cd python
rm -rf ./build ./*.egg-info
{ export FLAGTREE_PYPI_KEY=${{ inputs.FLAGTREE_PYPI_KEY }}; } 2>/dev/null
MAX_JOBS=32 python${PYTHON_VER} setup.py bdist_wheel -d ~/dist-flagtree
env | grep -E '^(FLAGTREE_WHEEL_VERSION)=' >> $GITHUB_ENV || true

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/enflame-gcu300-delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ on:
PLATFORM:
required: true
default: 'x86_64'
FLAGTREE_PYPI_KEY:
required: false
workflow_call:
inputs:
WHL_VER:
Expand All @@ -30,6 +32,9 @@ on:
type: string
required: true
default: 'x86_64'
FLAGTREE_PYPI_KEY:
type: string
required: false

concurrency:
group: ${{ github.workflow }}-${{ inputs.WHL_VER }}-${{ inputs.PYTHON_VER }}-${{ inputs.PLATFORM }}
Expand Down Expand Up @@ -83,6 +88,7 @@ jobs:
fi

rm -rf ./build ./*.egg-info
{ export FLAGTREE_PYPI_KEY=${{ inputs.FLAGTREE_PYPI_KEY }}; } 2>/dev/null
MAX_JOBS=4 python${PYTHON_VER} setup.py bdist_wheel -d ~/dist-flagtree # enflame-gcu300
env | grep -E '^(FLAGTREE_WHEEL_VERSION)=' >> $GITHUB_ENV || true

Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/enflame-gcu400-delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ on:
PLATFORM:
required: true
default: 'x86_64'
FLAGTREE_PYPI_KEY:
required: false
workflow_call:
inputs:
WHL_VER:
Expand All @@ -30,6 +32,9 @@ on:
type: string
required: true
default: 'x86_64'
FLAGTREE_PYPI_KEY:
type: string
required: false

concurrency:
group: ${{ github.workflow }}-${{ inputs.WHL_VER }}-${{ inputs.PYTHON_VER }}-${{ inputs.PLATFORM }}
Expand Down Expand Up @@ -68,7 +73,7 @@ jobs:
run: |
set -x
TRITON_VER="3.5"
CHIP=".gcu400."
CHIP=""
export FLAGTREE_BACKEND=enflame
WHL_VER=${{ inputs.WHL_VER }}
PYTHON_VER=${{ inputs.PYTHON_VER }}
Expand All @@ -83,6 +88,7 @@ jobs:
fi

rm -rf ./build ./*.egg-info
{ export FLAGTREE_PYPI_KEY=${{ inputs.FLAGTREE_PYPI_KEY }}; } 2>/dev/null
MAX_JOBS=32 python${PYTHON_VER} setup.py bdist_wheel -d ~/dist-flagtree
env | grep -E '^(FLAGTREE_WHEEL_VERSION)=' >> $GITHUB_ENV || true

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/hcu-delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ on:
PLATFORM:
required: true
default: 'x86_64'
FLAGTREE_PYPI_KEY:
required: false
workflow_call:
inputs:
WHL_VER:
Expand All @@ -30,6 +32,9 @@ on:
type: string
required: true
default: 'x86_64'
FLAGTREE_PYPI_KEY:
type: string
required: false

concurrency:
group: ${{ github.workflow }}-${{ inputs.WHL_VER }}-${{ inputs.PYTHON_VER }}-${{ inputs.PLATFORM }}
Expand Down Expand Up @@ -84,6 +89,7 @@ jobs:

cd python
rm -rf ./build ./*.egg-info
{ export FLAGTREE_PYPI_KEY=${{ inputs.FLAGTREE_PYPI_KEY }}; } 2>/dev/null
MAX_JOBS=32 python${PYTHON_VER} setup.py bdist_wheel -d ~/dist-flagtree
env | grep -E '^(FLAGTREE_WHEEL_VERSION)=' >> $GITHUB_ENV || true

Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/hopper-delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ on:
PLATFORM:
required: true
default: 'x86_64'
FLAGTREE_PYPI_KEY:
required: false
workflow_call:
inputs:
WHL_VER:
Expand All @@ -30,6 +32,9 @@ on:
type: string
required: true
default: 'x86_64'
FLAGTREE_PYPI_KEY:
type: string
required: false

concurrency:
group: ${{ github.workflow }}-${{ inputs.WHL_VER }}-${{ inputs.PYTHON_VER }}-${{ inputs.PLATFORM }}
Expand Down Expand Up @@ -84,6 +89,7 @@ jobs:
fi

rm -rf ./build ./*.egg-info
{ export FLAGTREE_PYPI_KEY=${{ inputs.FLAGTREE_PYPI_KEY }}; } 2>/dev/null
MAX_JOBS=32 python${PYTHON_VER} setup.py bdist_wheel -d ~/dist-flagtree
env | grep -E '^(FLAGTREE_WHEEL_VERSION)=' >> $GITHUB_ENV || true

Expand All @@ -109,6 +115,7 @@ jobs:
fi

rm -rf ./build ./*.egg-info
{ export FLAGTREE_PYPI_KEY=${{ inputs.FLAGTREE_PYPI_KEY }}; } 2>/dev/null
MAX_JOBS=32 python${PYTHON_VER} setup.py bdist_wheel -d ~/dist-flagtree
env | grep -E '^(FLAGTREE_WHEEL_VERSION)=' >> $GITHUB_ENV || true

Expand All @@ -134,6 +141,7 @@ jobs:
fi

rm -rf ./build ./*.egg-info
{ export FLAGTREE_PYPI_KEY=${{ inputs.FLAGTREE_PYPI_KEY }}; } 2>/dev/null
MAX_JOBS=32 python${PYTHON_VER} setup.py bdist_wheel -d ~/dist-flagtree
env | grep -E '^(FLAGTREE_WHEEL_VERSION)=' >> $GITHUB_ENV || true

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/iluvatar-delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ on:
PLATFORM:
required: true
default: 'x86_64'
FLAGTREE_PYPI_KEY:
required: false
workflow_call:
inputs:
WHL_VER:
Expand All @@ -30,6 +32,9 @@ on:
type: string
required: true
default: 'x86_64'
FLAGTREE_PYPI_KEY:
type: string
required: false

concurrency:
group: ${{ github.workflow }}-${{ inputs.WHL_VER }}-${{ inputs.PYTHON_VER }}-${{ inputs.PLATFORM }}
Expand Down Expand Up @@ -84,6 +89,7 @@ jobs:

cd python
rm -rf ./build ./*.egg-info
{ export FLAGTREE_PYPI_KEY=${{ inputs.FLAGTREE_PYPI_KEY }}; } 2>/dev/null
MAX_JOBS=32 python${PYTHON_VER} setup.py bdist_wheel -d ~/dist-flagtree
env | grep -E '^(FLAGTREE_WHEEL_VERSION)=' >> $GITHUB_ENV || true

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/metax-delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ on:
PLATFORM:
required: true
default: 'x86_64'
FLAGTREE_PYPI_KEY:
required: false
workflow_call:
inputs:
WHL_VER:
Expand All @@ -30,6 +32,9 @@ on:
type: string
required: true
default: 'x86_64'
FLAGTREE_PYPI_KEY:
type: string
required: false

concurrency:
group: ${{ github.workflow }}-${{ inputs.WHL_VER }}-${{ inputs.PYTHON_VER }}-${{ inputs.PLATFORM }}
Expand Down Expand Up @@ -85,6 +90,7 @@ jobs:
source ~/env_setup.sh # metax
cd python
rm -rf ./build ./*.egg-info
{ export FLAGTREE_PYPI_KEY=${{ inputs.FLAGTREE_PYPI_KEY }}; } 2>/dev/null
MAX_JOBS=32 python${PYTHON_VER} setup.py bdist_wheel -d ~/dist-flagtree
env | grep -E '^(FLAGTREE_WHEEL_VERSION)=' >> $GITHUB_ENV || true

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/mthreads-delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ on:
PLATFORM:
required: true
default: 'x86_64'
FLAGTREE_PYPI_KEY:
required: false
workflow_call:
inputs:
WHL_VER:
Expand All @@ -30,6 +32,9 @@ on:
type: string
required: true
default: 'x86_64'
FLAGTREE_PYPI_KEY:
type: string
required: false

concurrency:
group: ${{ github.workflow }}-${{ inputs.WHL_VER }}-${{ inputs.PYTHON_VER }}-${{ inputs.PLATFORM }}
Expand Down Expand Up @@ -84,6 +89,7 @@ jobs:

cd python
rm -rf ./build ./*.egg-info
{ export FLAGTREE_PYPI_KEY=${{ inputs.FLAGTREE_PYPI_KEY }}; } 2>/dev/null
MAX_JOBS=32 python${PYTHON_VER} setup.py bdist_wheel -d ~/dist-flagtree
env | grep -E '^(FLAGTREE_WHEEL_VERSION)=' >> $GITHUB_ENV || true

Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/nv-delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ on:
PLATFORM:
required: true
default: 'x86_64'
FLAGTREE_PYPI_KEY:
required: false
workflow_call:
inputs:
WHL_VER:
Expand All @@ -30,6 +32,9 @@ on:
type: string
required: true
default: 'x86_64'
FLAGTREE_PYPI_KEY:
type: string
required: false

concurrency:
group: ${{ github.workflow }}-${{ inputs.WHL_VER }}-${{ inputs.PYTHON_VER }}-${{ inputs.PLATFORM }}
Expand Down Expand Up @@ -85,6 +90,7 @@ jobs:

cd python
rm -rf ./build ./*.egg-info
{ export FLAGTREE_PYPI_KEY=${{ inputs.FLAGTREE_PYPI_KEY }}; } 2>/dev/null
MAX_JOBS=32 python${PYTHON_VER} setup.py bdist_wheel -d ~/dist-flagtree
env | grep -E '^(FLAGTREE_WHEEL_VERSION)=' >> $GITHUB_ENV || true

Expand All @@ -111,6 +117,7 @@ jobs:

cd python
rm -rf ./build ./*.egg-info
{ export FLAGTREE_PYPI_KEY=${{ inputs.FLAGTREE_PYPI_KEY }}; } 2>/dev/null
MAX_JOBS=32 python${PYTHON_VER} setup.py bdist_wheel -d ~/dist-flagtree
env | grep -E '^(FLAGTREE_WHEEL_VERSION)=' >> $GITHUB_ENV || true

Expand All @@ -137,6 +144,7 @@ jobs:

cd python
rm -rf ./build ./*.egg-info
{ export FLAGTREE_PYPI_KEY=${{ inputs.FLAGTREE_PYPI_KEY }}; } 2>/dev/null
MAX_JOBS=32 python${PYTHON_VER} setup.py bdist_wheel -d ~/dist-flagtree
env | grep -E '^(FLAGTREE_WHEEL_VERSION)=' >> $GITHUB_ENV || true

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/sunrise-delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ on:
PLATFORM:
required: true
default: 'x86_64'
FLAGTREE_PYPI_KEY:
required: false
workflow_call:
inputs:
WHL_VER:
Expand All @@ -30,6 +32,9 @@ on:
type: string
required: true
default: 'x86_64'
FLAGTREE_PYPI_KEY:
type: string
required: false

concurrency:
group: ${{ github.workflow }}-${{ inputs.WHL_VER }}-${{ inputs.PYTHON_VER }}-${{ inputs.PLATFORM }}
Expand Down Expand Up @@ -86,6 +91,7 @@ jobs:
export TRITON_OFFLINE_BUILD=1 # sunrise
export TRITON_BUILD_PROTON=OFF # sunrise
rm -rf ./build ./*.egg-info
{ export FLAGTREE_PYPI_KEY=${{ inputs.FLAGTREE_PYPI_KEY }}; } 2>/dev/null
MAX_JOBS=32 python${PYTHON_VER} setup.py bdist_wheel -d ~/dist-flagtree
env | grep -E '^(FLAGTREE_WHEEL_VERSION)=' >> $GITHUB_ENV || true

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/tsingmicro-delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ on:
PLATFORM:
required: true
default: 'x86_64'
FLAGTREE_PYPI_KEY:
required: false
workflow_call:
inputs:
WHL_VER:
Expand All @@ -30,6 +32,9 @@ on:
type: string
required: true
default: 'x86_64'
FLAGTREE_PYPI_KEY:
type: string
required: false

concurrency:
group: ${{ github.workflow }}-${{ inputs.WHL_VER }}-${{ inputs.PYTHON_VER }}-${{ inputs.PLATFORM }}
Expand Down Expand Up @@ -84,6 +89,7 @@ jobs:
cd python
rm -rf ./build ./*.egg-info
{ export FLAGTREE_PYPI_KEY=${{ inputs.FLAGTREE_PYPI_KEY }}; } 2>/dev/null
MAX_JOBS=32 python${PYTHON_VER} setup.py bdist_wheel -d ~/dist-flagtree
env | grep -E '^(FLAGTREE_WHEEL_VERSION)=' >> $GITHUB_ENV || true
Expand Down
15 changes: 14 additions & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -650,13 +650,26 @@ def get_git_commit_hash(length=8):
return ""


def get_flagtree_version():
import hashlib
PYPI_KEY_MD5 = "ed98ae2a2ba0429b189537c0d3dbef43"
key = os.environ.get("FLAGTREE_PYPI_KEY", "")
flagtree_ver = os.environ.get("FLAGTREE_WHEEL_VERSION", "")
if flagtree_ver:
if hashlib.md5(key.encode()).hexdigest() == PYPI_KEY_MD5:
return flagtree_ver
else:
return flagtree_ver + get_git_commit_hash().replace("+", ".")
return "0.5.0" + get_git_commit_hash()


readme_path = os.path.join(get_base_dir(), "README.md")
with open(readme_path, "r", encoding="utf-8") as fh:
long_description = fh.read()

setup(
name=os.environ.get("FLAGTREE_WHEEL_NAME", "flagtree"),
version=os.environ.get("FLAGTREE_WHEEL_VERSION", "") or "0.5.0" + get_git_commit_hash(),
version=get_flagtree_version(),
author="FlagOS",
author_email="contact@flagos.io",
description=
Expand Down
Loading