Skip to content

Conversation

@whoisj
Copy link
Contributor

@whoisj whoisj commented Nov 25, 2025

This change adds the generation of PT2 format serialized PyTorch model files to the QA model generation scripts.

TRI-172

@whoisj whoisj requested a review from yinggeh November 25, 2025 21:04
# Use a different model name for the non-batching variant
model_name = tu.get_model_name(
"libtorch_nobatch" if max_batch == 0 else "libtorch",
"libtorch_nobatch" if max_batch == 0 else "libtorch2" if torch2 else "libtorch",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please refactor and make the statement clear

Copy link
Contributor Author

@whoisj whoisj Nov 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done. also, apologies for the force push, hadn't realized that anyone had reviewed the changes already. won't happen again. thanks.

with open(f"{config_path}/config.pbtxt", "w") as f:
f.write(
"""
backend: "pytorch"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be pytorch2?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trying to keep them as the same backend.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. They differs by "platform"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct. That's the plan. Ideally we don't have competing "pytorch" and "pytorch_inductor" backends.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renamed the platform to torch_aoti to better reflect what it is and does.

@whoisj whoisj force-pushed the jwyman/pt2/gen-models branch from 55ebafa to 558c361 Compare November 25, 2025 23:27
@whoisj whoisj requested review from pskiran1 and yinggeh December 3, 2025 20:29
This change adds the generation of PT2 format serialized PyTorch model files to the QA model generation scripts.
@whoisj whoisj force-pushed the jwyman/pt2/gen-models branch from 558c361 to 78f755f Compare December 4, 2025 18:41
TEST_RESULT_FILE="./test_results.txt"
CLIENT_PY="./python_based_backends_test.py"
GEN_PYTORCH_MODEL_PY="../../common/gen_qa_pytorch_model.py"
GEN_TORCHAOTI_MODEL_PY="../../common/gen_qa_torch_aoti_model.py"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this variable used?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

@@ -0,0 +1,124 @@
# Copyright 2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this file being used?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

@whoisj whoisj force-pushed the jwyman/pt2/gen-models branch 2 times, most recently from 5dd1300 to 53b28e7 Compare December 17, 2025 16:31
@whoisj whoisj requested review from mc-nv and yinggeh December 17, 2025 16:31
@whoisj whoisj force-pushed the jwyman/pt2/gen-models branch from 53b28e7 to 16c6c0a Compare December 17, 2025 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants