mirror of
https://github.com/nod-ai/AMD-SHARK-Studio.git
synced 2026-04-03 03:00:17 -04:00
Rename to tflite and ignore lit.cfg.py in flake8
This commit is contained in:
4
.github/workflows/test-models.yml
vendored
4
.github/workflows/test-models.yml
vendored
@@ -33,9 +33,9 @@ jobs:
|
||||
- name: Lint with flake8
|
||||
run: |
|
||||
# stop the build if there are Python syntax errors or undefined names
|
||||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
||||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude lit.cfg.py
|
||||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
||||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
||||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude lit.cfg.py
|
||||
- name: Validate Models
|
||||
run: |
|
||||
cd $GITHUB_WORKSPACE
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
[pytest]
|
||||
addopts = --verbose -p no:warnings
|
||||
norecursedirs = inference tank/tflitehub
|
||||
norecursedirs = inference tank
|
||||
|
||||
46
tank/tflite/lit.cfg.py
Normal file
46
tank/tflite/lit.cfg.py
Normal file
@@ -0,0 +1,46 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
import lit.formats
|
||||
import lit.util
|
||||
|
||||
import lit.llvm
|
||||
|
||||
# Configuration file for the 'lit' test runner.
|
||||
lit.llvm.initialize(lit_config, config)
|
||||
|
||||
# name: The name of this test suite.
|
||||
config.name = 'TFLITEHUB'
|
||||
|
||||
config.test_format = lit.formats.ShTest()
|
||||
|
||||
# suffixes: A list of file extensions to treat as test files.
|
||||
config.suffixes = ['.py']
|
||||
|
||||
# test_source_root: The root path where tests are located.
|
||||
config.test_source_root = os.path.dirname(__file__)
|
||||
|
||||
#config.use_default_substitutions()
|
||||
config.excludes = [
|
||||
'coco_test_data.py',
|
||||
'imagenet_test_data.py',
|
||||
'lit.cfg.py',
|
||||
'lit.site.cfg.py',
|
||||
'manual_test.py',
|
||||
'squad_test_data.py',
|
||||
'test_util.py',
|
||||
]
|
||||
|
||||
config.substitutions.extend([
|
||||
('%PYTHON', sys.executable),
|
||||
])
|
||||
|
||||
config.environment['PYTHONPATH'] = ":".join(sys.path)
|
||||
|
||||
project_root = os.path.dirname(os.path.dirname(__file__))
|
||||
|
||||
# Enable features based on -D FEATURES=hugetest,vulkan
|
||||
# syntax.
|
||||
features_param = lit_config.params.get('FEATURES')
|
||||
if features_param:
|
||||
config.available_features.update(features_param.split(','))
|
||||
Reference in New Issue
Block a user