-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
75 additions
and
39 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,37 @@ | ||
from typing import List, Literal, get_args | ||
|
||
from Ne16TestConf import Ne16TestConf | ||
from Ne16Weight import Ne16Weight | ||
from NeurekaTestConf import NeurekaTestConf | ||
from NeurekaV2TestConf import NeurekaV2TestConf | ||
from NeurekaV2Weight import NeurekaV2Weight | ||
from NeurekaWeight import NeurekaWeight | ||
from NnxTestClasses import NnxTestConf, NnxWeight | ||
|
||
NnxName = Literal["ne16", "neureka", "neureka_v2"] | ||
|
||
|
||
def valid_nnx_names() -> List[str]: | ||
return get_args(NnxName) | ||
|
||
|
||
def is_valid_nnx_name(name: str) -> bool: | ||
return name in valid_nnx_names() | ||
|
||
|
||
def NnxWeightClsFromName(name: NnxName) -> NnxWeight: | ||
if name == "ne16": | ||
return Ne16Weight | ||
elif name == "neureka": | ||
return NeurekaWeight | ||
elif name == "neureka_v2": | ||
return NeurekaV2Weight | ||
|
||
|
||
def NnxTestConfClsFromName(name: NnxName) -> NnxTestConf: | ||
if name == "ne16": | ||
return Ne16TestConf | ||
elif name == "neureka": | ||
return NeurekaTestConf | ||
elif name == "neureka_v2": | ||
return NeurekaV2TestConf |
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
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