Skip to content

Commit

Permalink
Convert other files.
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottTodd committed Apr 12, 2024
1 parent 94b86ed commit cb8658f
Show file tree
Hide file tree
Showing 26 changed files with 179 additions and 187 deletions.
24 changes: 14 additions & 10 deletions iree_tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,9 @@ def check_for_lfs_files(self):

def check_for_remote_files(self, test_case_json):
"""Checks if all remote_files in a JSON test case exist on disk."""
if "remote_files" not in test_case_json:
return True

have_all_files = True
for remote_file_url in test_case_json["remote_files"]:
remote_file = remote_file_url.rsplit("/", 1)[-1]
Expand Down Expand Up @@ -212,18 +215,19 @@ def discover_test_cases(self):

for test_cases_path in self.path.parent.glob("*.json"):
with open(test_cases_path) as f:
test_case_json = pyjson5.load(f)
if test_case_json.get("file_format", "") != "test_case_v0":
test_cases_json = pyjson5.load(f)
if test_cases_json.get("file_format", "") != "test_cases_v0":
continue
test_case_name = test_case_json["name"]
have_all_files = self.check_for_remote_files(test_case_json)
test_cases.append(
MlirFile.TestCase(
name=test_case_name,
runtime_flagfile=test_case_json["runtime_flagfile"],
enabled=have_lfs_files and have_all_files,
for test_case_json in test_cases_json["test_cases"]:
test_case_name = test_case_json["name"]
have_all_files = self.check_for_remote_files(test_case_json)
test_cases.append(
MlirFile.TestCase(
name=test_case_name,
runtime_flagfile=test_case_json["runtime_flagfile"],
enabled=have_lfs_files and have_all_files,
)
)
)

return test_cases

Expand Down
15 changes: 8 additions & 7 deletions iree_tests/download_remote_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,14 @@ def download_for_test_case(test_dir: Path, test_case_json: dict):
)
args = parser.parse_args()

for test_case_path in (THIS_DIR / args.root_dir).rglob("*.json"):
with open(test_case_path) as f:
test_case_json = pyjson5.load(f)
if test_case_json.get("file_format", "") != "test_case_v0":
for test_cases_path in (THIS_DIR / args.root_dir).rglob("*.json"):
with open(test_cases_path) as f:
test_cases_json = pyjson5.load(f)
if test_cases_json.get("file_format", "") != "test_cases_v0":
continue

print(f"Processing {test_case_path.relative_to(THIS_DIR)}")
print(f"Processing {test_cases_path.relative_to(THIS_DIR)}")

test_dir = test_case_path.parent
download_for_test_case(test_dir, test_case_json)
test_dir = test_cases_path.parent
for test_case_json in test_cases_json["test_cases"]:
download_for_test_case(test_dir, test_case_json)

This file was deleted.

12 changes: 3 additions & 9 deletions iree_tests/future-pytorch-models/llama-tank/test_cases.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
{
"file_format": "test_cases_v0",
"test_cases": [
{
"name": "splats",
"runtime_flagfile": "splat_data_flags.txt",
"remote_file_groups": [
{
"azure_account_url": "https://sharkpublic.blob.core.windows.net",
"azure_container_name": "sharkpublic",
"azure_base_blob_name": "sai/llama-tank/",
"files": [
"llama-tank.mlirbc"
]
}
"remote_files": [
"https://sharkpublic.blob.core.windows.net/sharkpublic/sai/llama-tank/llama-tank.mlirbc"
]
}
]
Expand Down

This file was deleted.

20 changes: 7 additions & 13 deletions iree_tests/future-pytorch-models/sd-clip-tank/test_cases.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
{
"file_format": "test_cases_v0",
"test_cases": [
{
"name": "splats",
"runtime_flagfile": "splat_data_flags.txt",
"remote_file_groups": []
"remote_files": []
},
{
"name": "real_weights",
"runtime_flagfile": "real_weights_data_flags.txt",
"remote_file_groups": [
{
"azure_account_url": "https://sharkpublic.blob.core.windows.net",
"azure_container_name": "sharkpublic",
"azure_base_blob_name": "sai/sd-clip-tank/",
"files": [
"inference_input.0.bin",
"inference_output.0.bin",
"inference_output.1.bin",
"real_weights.irpa"
]
}
"remote_files": [
"https://sharkpublic.blob.core.windows.net/sharkpublic/sai/sd-clip-tank/inference_input.0.bin",
"https://sharkpublic.blob.core.windows.net/sharkpublic/sai/sd-clip-tank/inference_output.0.bin",
"https://sharkpublic.blob.core.windows.net/sharkpublic/sai/sd-clip-tank/inference_output.1.bin",
"https://sharkpublic.blob.core.windows.net/sharkpublic/sai/sd-clip-tank/real_weights.irpa"
]
}
]
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"file_format": "test_cases_v0",
"test_cases": [
{
"name": "splats",
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"file_format": "test_cases_v0",
"test_cases": [
{
"name": "splats",
"runtime_flagfile": "splat_data_flags.txt",
"remote_files": []
},
{
"name": "real_weights",
"runtime_flagfile": "real_weights_data_flags.txt",
"remote_files": [
"https://sharkpublic.blob.core.windows.net/sharkpublic/sai/sd-vae-decode-tank/inference_input.0.bin",
"https://sharkpublic.blob.core.windows.net/sharkpublic/sai/sd-vae-decode-tank/inference_output.0.bin",
"https://sharkpublic.blob.core.windows.net/sharkpublic/sai/sd-vae-decode-tank/real_weights.irpa",
"https://sharkpublic.blob.core.windows.net/sharkpublic/sai/sd-vae-decode-tank/sd-vae-decode-tank.mlirbc"
]
}
]
}
34 changes: 0 additions & 34 deletions iree_tests/pytorch/models/opt-125M/test_case_real_weights.json

This file was deleted.

6 changes: 0 additions & 6 deletions iree_tests/pytorch/models/opt-125M/test_case_splats.json

This file was deleted.

43 changes: 43 additions & 0 deletions iree_tests/pytorch/models/opt-125M/test_cases.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"file_format": "test_cases_v0",
"test_cases": [
{
"name": "splats",
"runtime_flagfile": "splat_data_flags.txt",
"remote_files": []
},
{
"name": "real_weights",
"runtime_flagfile": "real_weights_data_flags.txt",
"remote_files": [
"https://sharkpublic.blob.core.windows.net/sharkpublic/scotttodd/iree_tests/2024-03-12/opt-125M/inference_input.0.bin",
"https://sharkpublic.blob.core.windows.net/sharkpublic/scotttodd/iree_tests/2024-03-12/opt-125M/inference_output.0.bin",
"https://sharkpublic.blob.core.windows.net/sharkpublic/scotttodd/iree_tests/2024-03-12/opt-125M/inference_output.1.bin",
"https://sharkpublic.blob.core.windows.net/sharkpublic/scotttodd/iree_tests/2024-03-12/opt-125M/inference_output.2.bin",
"https://sharkpublic.blob.core.windows.net/sharkpublic/scotttodd/iree_tests/2024-03-12/opt-125M/inference_output.3.bin",
"https://sharkpublic.blob.core.windows.net/sharkpublic/scotttodd/iree_tests/2024-03-12/opt-125M/inference_output.4.bin",
"https://sharkpublic.blob.core.windows.net/sharkpublic/scotttodd/iree_tests/2024-03-12/opt-125M/inference_output.5.bin",
"https://sharkpublic.blob.core.windows.net/sharkpublic/scotttodd/iree_tests/2024-03-12/opt-125M/inference_output.6.bin",
"https://sharkpublic.blob.core.windows.net/sharkpublic/scotttodd/iree_tests/2024-03-12/opt-125M/inference_output.7.bin",
"https://sharkpublic.blob.core.windows.net/sharkpublic/scotttodd/iree_tests/2024-03-12/opt-125M/inference_output.8.bin",
"https://sharkpublic.blob.core.windows.net/sharkpublic/scotttodd/iree_tests/2024-03-12/opt-125M/inference_output.9.bin",
"https://sharkpublic.blob.core.windows.net/sharkpublic/scotttodd/iree_tests/2024-03-12/opt-125M/inference_output.10.bin",
"https://sharkpublic.blob.core.windows.net/sharkpublic/scotttodd/iree_tests/2024-03-12/opt-125M/inference_output.11.bin",
"https://sharkpublic.blob.core.windows.net/sharkpublic/scotttodd/iree_tests/2024-03-12/opt-125M/inference_output.12.bin",
"https://sharkpublic.blob.core.windows.net/sharkpublic/scotttodd/iree_tests/2024-03-12/opt-125M/inference_output.13.bin",
"https://sharkpublic.blob.core.windows.net/sharkpublic/scotttodd/iree_tests/2024-03-12/opt-125M/inference_output.14.bin",
"https://sharkpublic.blob.core.windows.net/sharkpublic/scotttodd/iree_tests/2024-03-12/opt-125M/inference_output.15.bin",
"https://sharkpublic.blob.core.windows.net/sharkpublic/scotttodd/iree_tests/2024-03-12/opt-125M/inference_output.16.bin",
"https://sharkpublic.blob.core.windows.net/sharkpublic/scotttodd/iree_tests/2024-03-12/opt-125M/inference_output.17.bin",
"https://sharkpublic.blob.core.windows.net/sharkpublic/scotttodd/iree_tests/2024-03-12/opt-125M/inference_output.18.bin",
"https://sharkpublic.blob.core.windows.net/sharkpublic/scotttodd/iree_tests/2024-03-12/opt-125M/inference_output.19.bin",
"https://sharkpublic.blob.core.windows.net/sharkpublic/scotttodd/iree_tests/2024-03-12/opt-125M/inference_output.20.bin",
"https://sharkpublic.blob.core.windows.net/sharkpublic/scotttodd/iree_tests/2024-03-12/opt-125M/inference_output.21.bin",
"https://sharkpublic.blob.core.windows.net/sharkpublic/scotttodd/iree_tests/2024-03-12/opt-125M/inference_output.22.bin",
"https://sharkpublic.blob.core.windows.net/sharkpublic/scotttodd/iree_tests/2024-03-12/opt-125M/inference_output.23.bin",
"https://sharkpublic.blob.core.windows.net/sharkpublic/scotttodd/iree_tests/2024-03-12/opt-125M/inference_output.24.bin",
"https://sharkpublic.blob.core.windows.net/sharkpublic/scotttodd/iree_tests/2024-03-12/opt-125M/real_weights.irpa"
]
}
]
}
10 changes: 0 additions & 10 deletions iree_tests/pytorch/models/resnet50/test_case_real_weights.json

This file was deleted.

6 changes: 0 additions & 6 deletions iree_tests/pytorch/models/resnet50/test_case_splats.json

This file was deleted.

19 changes: 19 additions & 0 deletions iree_tests/pytorch/models/resnet50/test_cases.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"file_format": "test_cases_v0",
"test_cases": [
{
"name": "splats",
"runtime_flagfile": "splat_data_flags.txt",
"remote_files": []
},
{
"name": "real_weights",
"runtime_flagfile": "real_weights_data_flags.txt",
"remote_files": [
"https://sharkpublic.blob.core.windows.net/sharkpublic/scotttodd/iree_tests/2024-03-12/resnet50/inference_input.0.bin",
"https://sharkpublic.blob.core.windows.net/sharkpublic/scotttodd/iree_tests/2024-03-12/resnet50/inference_output.0.bin",
"https://sharkpublic.blob.core.windows.net/sharkpublic/scotttodd/iree_tests/2024-03-12/resnet50/real_weights.irpa"
]
}
]
}

This file was deleted.

This file was deleted.

23 changes: 23 additions & 0 deletions iree_tests/pytorch/models/sdxl-prompt-encoder-tank/test_cases.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"file_format": "test_cases_v0",
"test_cases": [
{
"name": "splats",
"runtime_flagfile": "splat_data_flags.txt",
"remote_files": []
},
{
"name": "real_weights",
"runtime_flagfile": "real_weights_data_flags.txt",
"remote_files": [
"https://sharkpublic.blob.core.windows.net/sharkpublic/sai/sdxl-prompt-encoder/inference_input.0.bin",
"https://sharkpublic.blob.core.windows.net/sharkpublic/sai/sdxl-prompt-encoder/inference_input.1.bin",
"https://sharkpublic.blob.core.windows.net/sharkpublic/sai/sdxl-prompt-encoder/inference_input.2.bin",
"https://sharkpublic.blob.core.windows.net/sharkpublic/sai/sdxl-prompt-encoder/inference_input.3.bin",
"https://sharkpublic.blob.core.windows.net/sharkpublic/sai/sdxl-prompt-encoder/inference_output.0.bin",
"https://sharkpublic.blob.core.windows.net/sharkpublic/sai/sdxl-prompt-encoder/inference_output.1.bin",
"https://sharkpublic.blob.core.windows.net/sharkpublic/sai/sdxl-prompt-encoder/real_weights.irpa"
]
}
]
}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"file_format": "test_cases_v0",
"test_cases": [
{
"name": "splats",
"runtime_flagfile": "splat_data_flags.txt",
"remote_files": []
},
{
"name": "real_weights",
"runtime_flagfile": "real_weights_data_flags.txt",
"remote_files": [
"https://sharkpublic.blob.core.windows.net/sharkpublic/sai/sdxl-scheduled-unet/inference_input.0.bin",
"https://sharkpublic.blob.core.windows.net/sharkpublic/sai/sdxl-scheduled-unet/inference_input.1.bin",
"https://sharkpublic.blob.core.windows.net/sharkpublic/sai/sdxl-scheduled-unet/inference_input.2.bin",
"https://sharkpublic.blob.core.windows.net/sharkpublic/sai/sdxl-scheduled-unet/inference_input.3.bin",
"https://sharkpublic.blob.core.windows.net/sharkpublic/sai/sdxl-scheduled-unet/inference_output.0.bin",
"https://sharkpublic.blob.core.windows.net/sharkpublic/sai/sdxl-scheduled-unet/real_weights.irpa"
]
}
]
}
Loading

0 comments on commit cb8658f

Please sign in to comment.