mirror of
https://github.com/nod-ai/AMD-SHARK-Studio.git
synced 2026-04-03 03:00:17 -04:00
Fix repo_dir cannot export/write mlir file bug (#157)
-Set repro_dir as a temporary dir within current working directory.
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -162,6 +162,7 @@ cython_debug/
|
||||
|
||||
# Shark related artefacts
|
||||
*venv/
|
||||
shark_tmp/
|
||||
|
||||
# ORT related artefacts
|
||||
cache_models/
|
||||
|
||||
@@ -44,8 +44,7 @@ parser.add_argument(
|
||||
parser.add_argument(
|
||||
"--repro_dir",
|
||||
help="Directory to which module files will be saved for reproduction or debugging.",
|
||||
type=dir_path,
|
||||
default="./repro_dir/",
|
||||
default="./shark_tmp/",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--save_mlir",
|
||||
@@ -79,3 +78,7 @@ parser.add_argument(
|
||||
)
|
||||
|
||||
shark_args, unknown = parser.parse_known_args()
|
||||
|
||||
if not os.path.exists(shark_args.repro_dir):
|
||||
# Create a new directory because it does not exist
|
||||
os.makedirs(shark_args.repro_dir)
|
||||
|
||||
@@ -89,5 +89,8 @@ class AlbertTfliteModuleTest(unittest.TestCase):
|
||||
|
||||
if __name__ == "__main__":
|
||||
# module_tester = AlbertTfliteModuleTester()
|
||||
# module_tester.save_mlir = True
|
||||
# module_tester.save_vmfb = True
|
||||
# module_tester.create_and_check_module()
|
||||
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user