Skip to content
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
2 changes: 1 addition & 1 deletion graph_net/torch/single_device_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def main(args):
print(f"{model_path=}")
if args.enable_extract:
assert args.extract_name is not None
kwargs = dict(name=args.extract_name, **dump_graph_options)
kwargs = dict(name=args.extract_name, dynamic=False, **dump_graph_options)
model = extract(**kwargs)(model)

inputs_params = utils.load_converted_from_text(f"{model_path}")
Expand Down
5 changes: 4 additions & 1 deletion graph_net/torch/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ def temp_workspace():
def main(args):
model_path = args.model_path
with temp_workspace() as tmp_dir_name:
extract_name = "temp"
print("Check extractability ...")
cmd = f"{sys.executable} -m graph_net.torch.single_device_runner --model-path {model_path}"
cmd_ret = os.system(cmd)
assert cmd_ret == 0, f"{cmd_ret=}, {cmd=}"
extract_name = "temp"
cmd = f"{sys.executable} -m graph_net.torch.single_device_runner --model-path {model_path} --enable-extract True --extract-name {extract_name} --dump-graph-hash-key"
cmd_ret = os.system(cmd)
assert cmd_ret == 0, f"{cmd_ret=}, {cmd=}"
Expand Down
2 changes: 1 addition & 1 deletion samples/torchvision/resnet18/graph_hash.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9d1568d6617d5b2d5d3762b24b3c296f63fe423cfecdc27d6ecd425c0290de74
6307f5cae7a727aa9c38f51c1b38fc303106c8d7d9f318a74039249efe87f3d4