Skip to content

Commit

Permalink
Run all timm tests
Browse files Browse the repository at this point in the history
  • Loading branch information
xuzhao9 committed Jun 5, 2024
1 parent 96f593c commit 4923ed5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 17 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/torchao.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ jobs:
pushd benchmark
# Upload the result json to Amazon S3
python ./scripts/userbenchmark/upload_s3_csv.py --s3-prefix torchbench-csv --userbenchmark torchao \
--workflow-run-id "${WORKFLOW_RUN_ID}" --workflow-run-attempt "${WORKFLOW_RUN_ATTEMPT}" \
--upload-path ../benchmark-output --match-filename "^torchao_.*\.csv"
--upload-path ../benchmark-output --match-filename "^torchao_.*\.csv"
- name: Clean up Conda env
if: always()
run: |
Expand Down
16 changes: 4 additions & 12 deletions scripts/userbenchmark/upload_s3_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,6 @@ def _get_files_to_upload(file_path: str, match_filename: str):
required=True,
help="Name of the userbenchmark.",
)
parser.add_argument(
"--workflow-run-id",
required=True,
help="Workflow Run ID.",
)
parser.add_argument(
"--workflow-run-attempt",
required=True,
help="Workflow attempt.",
)
parser.add_argument(
"--upload-path",
required=True,
Expand All @@ -88,12 +78,14 @@ def _get_files_to_upload(file_path: str, match_filename: str):
args = parser.parse_args()

files_to_upload = _get_files_to_upload(args.upload_path, args.match_filename)
workflow_run_id = os.environ.get("WORKFLOW_RUN_ID", 0)
workflow_run_attempt = os.environ.get("WORKFLOW_RUN_ATTEMPT", 0)

for file in files_to_upload:
file_path = Path(args.upload_path).joinpath(file)
upload_s3(s3_object=args.s3_prefix,
ub_name=args.userbenchmark,
workflow_run_id=args.workflow_run_id,
workflow_run_attempt=args.workflow_run_attempt,
workflow_run_id=workflow_run_id,
workflow_run_attempt=workflow_run_attempt,
file_path=file_path,
dryrun=args.dryrun)
6 changes: 3 additions & 3 deletions userbenchmark/torchao/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
CI_ARGS = [
# TIMM
["--progress", "--timm", "--performance", "--inference", "--bfloat16", "--quantization", "noquant", "--output", f"{str(OUTPUT_DIR.joinpath('torchao_noquant_timm_models_bfloat16_inference_cuda_performance.csv').resolve())}"],
# ["--progress", "--timm", "--performance", "--inference", "--bfloat16", "--quantization", "int8dynamic", "--output", f"{str(OUTPUT_DIR.joinpath('torchao_int8dynamic_timm_models_bfloat16_inference_cuda_performance.csv').resolve())}"],
# ["--progress", "--timm", "--performance", "--inference", "--bfloat16", "--quantization", "int8weightonly", "--output", f"{str(OUTPUT_DIR.joinpath('torchao_int8weightonly_timm_models_bfloat16_inference_cuda_performance.csv').resolve())}"],
# ["--progress", "--timm", "--performance", "--inference", "--bfloat16", "--quantization", "autoquant", "--output", f"{str(OUTPUT_DIR.joinpath('torchao_autoquant_timm_models_bfloat16_inference_cuda_performance.csv').resolve())}"],
["--progress", "--timm", "--performance", "--inference", "--bfloat16", "--quantization", "int8dynamic", "--output", f"{str(OUTPUT_DIR.joinpath('torchao_int8dynamic_timm_models_bfloat16_inference_cuda_performance.csv').resolve())}"],
["--progress", "--timm", "--performance", "--inference", "--bfloat16", "--quantization", "int8weightonly", "--output", f"{str(OUTPUT_DIR.joinpath('torchao_int8weightonly_timm_models_bfloat16_inference_cuda_performance.csv').resolve())}"],
["--progress", "--timm", "--performance", "--inference", "--bfloat16", "--quantization", "autoquant", "--output", f"{str(OUTPUT_DIR.joinpath('torchao_autoquant_timm_models_bfloat16_inference_cuda_performance.csv').resolve())}"],
]


Expand Down

0 comments on commit 4923ed5

Please sign in to comment.