Skip to content

Add an option to set minimum number of elements in the weight tensor to be quantized #667

Add an option to set minimum number of elements in the weight tensor to be quantized

Add an option to set minimum number of elements in the weight tensor to be quantized #667

# YAML schema for GitHub Actions:
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions
#
# Helpful YAML parser to clarify YAML syntax:
# https://yaml-online-parser.appspot.com/
#
# This workflow will run nightly or when triggered from PR comment
name: Python Unit Tests
on:
merge_group:
pull_request:
branches: ["main"]
push:
branches: ["main"]
workflow_dispatch: # Allow manual triggers
workflow_call:
inputs:
trigger-sha:
required: true
type: string
jobs:
run-unittests-python:
name: "Run Unit Tests with Python ${{ matrix.python-version }} on ${{ matrix.runner }}"
strategy:
matrix:
runner: [ubuntu-latest]
python-version: ["3.9", "3.10", "3.11"]
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v3
with:
ref: ${{ inputs.trigger-sha }}
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: "**/*requirements.txt"
- run: python -m pip install --upgrade pip setuptools
- name: Install dependencies
run: |
python -m pip install -r requirements.txt
- name: Run Tests
run: |
python -m unittest discover --pattern *_test.py
env:
STABLEHLO_BYTECODE_FROM_PRETTYPRINT: 1
CI: "true"