Skip to content

Commit

Permalink
Remove unused imports and move asserts for datagen into test_gen
Browse files Browse the repository at this point in the history
  • Loading branch information
lukamac committed Dec 12, 2024
1 parent d493a88 commit 2f213b8
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions test/testgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
import typing
from typing import Optional, Set, Type, Union

import numpy as np
import numpy.typing as npt
import toml

from HeaderWriter import HeaderWriter
Expand All @@ -34,7 +32,6 @@
NnxTestGenerator,
NnxTestHeaderGenerator,
NnxWeight,
WmemLiteral,
)


Expand Down Expand Up @@ -72,6 +69,10 @@ def test_gen(
nnxTestConfCls: Type[NnxTestConf],
nnxWeightCls: Type[NnxWeight],
):
assert not (
args.gen_ones and args.gen_incremented
), "You can choose only one method for input generation."

if args.conf.endswith(".toml"):
test_conf_dict = toml.load(args.conf)
elif args.conf.endswith(".json"):
Expand Down Expand Up @@ -238,10 +239,6 @@ def add_common_arguments(parser: argparse.ArgumentParser):

args = parser.parse_args()

assert not (
args.gen_ones and args.gen_incremented
), "You can choose only one method for input generation."

testConfCls, weightCls = NnxMapping[args.accelerator]

args.func(args, testConfCls, weightCls)

0 comments on commit 2f213b8

Please sign in to comment.