Skip to content

Commit

Permalink
#0: Fixed pre-commit errors (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
tapspatel authored Jul 16, 2024
1 parent ecd628c commit 9489070
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
6 changes: 3 additions & 3 deletions runtime/tools/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
from setuptools import setup
import shutil

TTMLIR_VERSION_MAJOR=os.getenv('TTMLIR_VERSION_MAJOR', '0')
TTMLIR_VERSION_MINOR=os.getenv('TTMLIR_VERSION_MINOR', '0')
TTMLIR_VERSION_PATCH=os.getenv('TTMLIR_VERSION_PATCH', '0')
TTMLIR_VERSION_MAJOR = os.getenv("TTMLIR_VERSION_MAJOR", "0")
TTMLIR_VERSION_MINOR = os.getenv("TTMLIR_VERSION_MINOR", "0")
TTMLIR_VERSION_PATCH = os.getenv("TTMLIR_VERSION_PATCH", "0")

__version__ = f"{TTMLIR_VERSION_MAJOR}.{TTMLIR_VERSION_MINOR}.{TTMLIR_VERSION_PATCH}"

Expand Down
9 changes: 7 additions & 2 deletions runtime/tools/python/ttrt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from pkg_resources import get_distribution


def system_desc_as_dict(desc):
return json.loads(desc.as_json())

Expand All @@ -17,14 +18,18 @@ def system_desc_as_dict(desc):
if "TT_METAL_LOGGER_LEVEL" not in os.environ:
os.environ["TT_METAL_LOGGER_LEVEL"] = "FATAL"


def check_version(fb_version):
package_name = 'ttrt'
package_name = "ttrt"
try:
package_version = get_distribution(package_name).version
except Exception as e:
print(f"Error retrieving version: {e} for {package_name}")

assert package_version == fb_version, f"{package_name}=v{package_version} does not match flatbuffer=v{fb_version}"
assert (
package_version == fb_version
), f"{package_name}=v{package_version} does not match flatbuffer=v{fb_version}"


def mlir_sections(fbb):
d = ttrt.binary.as_dict(fbb)
Expand Down

0 comments on commit 9489070

Please sign in to comment.