-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[tuner] Clean up candidate generation code (#508)
* Pass context explicitly to the parse function * Fix mypy typing violations * Add pyproject.toml
- Loading branch information
Showing
6 changed files
with
167 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
[project] | ||
name = "SHARK Tuner" | ||
authors = [ | ||
{name = "SHARK Authors"}, | ||
] | ||
description = "IREE Dispatch Tuner" | ||
readme = "README.md" | ||
license = {text = "Apache-2.0"} | ||
classifiers = [ | ||
"Development Status :: 3 - Alpha", | ||
"License :: OSI Approved :: Apache Software License", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Programming Language :: Python :: 3.13", | ||
] | ||
requires-python = ">= 3.10" | ||
|
||
# Version is set via the `setup.py`. | ||
dynamic = ["version"] | ||
|
||
[project.urls] | ||
Repository = "https://github.com/nod-ai/SHARK-Platform" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Copyright 2024 Advanced Micro Devices, Inc. | ||
# | ||
# Licensed under the Apache License v2.0 with LLVM Exceptions. | ||
# See https://llvm.org/LICENSE.txt for license information. | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
import json | ||
import os | ||
|
||
from setuptools import setup | ||
|
||
SETUPPY_DIR = os.path.realpath(os.path.dirname(__file__)) | ||
|
||
# Setup and get version information. | ||
VERSION_FILE = os.path.join(SETUPPY_DIR, "version.json") | ||
VERSION_FILE_LOCAL = os.path.join(SETUPPY_DIR, "version_local.json") | ||
|
||
|
||
def load_version_info(version_file): | ||
with open(version_file, "rt") as f: | ||
return json.load(f) | ||
|
||
|
||
try: | ||
version_info = load_version_info(VERSION_FILE_LOCAL) | ||
except FileNotFoundError: | ||
print("version_local.json not found. Default to dev build") | ||
version_info = load_version_info(VERSION_FILE) | ||
|
||
PACKAGE_VERSION = version_info.get("package-version") | ||
print(f"Using PACKAGE_VERSION: '{PACKAGE_VERSION}'") | ||
|
||
setup( | ||
version=f"{PACKAGE_VERSION}", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.