Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the bug for truncated model #372

Merged
merged 1 commit into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion alt_e2eshark/e2e_testing/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ def get_shape_string(torch_tensor):
dtype = torch_tensor.dtype
if dtype == torch.int64:
input_shape_string += "xi64"
if dtype == torch.int32:
input_shape_string += "xi32"
elif dtype == torch.float32 or dtype == torch.float:
input_shape_string += "xf32"
elif dtype == torch.bfloat16 or dtype == torch.float16 or dtype == torch.int16:
Expand Down Expand Up @@ -142,7 +144,9 @@ class TestTensors:

def __init__(self, data: Tuple):
self.data = data
self.type = type(self.data[0])
self.type = None
if len(data) > 0 :
self.type = type(self.data[0])
if not all([type(d) == self.type for d in data]):
self.type == None

Expand Down
1 change: 1 addition & 0 deletions alt_e2eshark/onnx_tests/helper_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def __init__(self, og_model_info_class: type, og_name: str, *args, **kwargs):
run_dir = Path(self.model).parents[1]
og_model_path = os.path.join(run_dir, og_name)
self.sibling_inst = og_model_info_class(og_name, og_model_path)
self.opset_version = self.sibling_inst.opset_version

def construct_model(self):
if not os.path.exists(self.sibling_inst.model):
Expand Down