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
python3 $TRITON_MDLS_SRC_DIR/gen_qa_models.py --torch-aoti --variable --models_dir=$TRITON_MDLS_QA_VARIABLE_MODEL
chmod -R 777 $TRITON_MDLS_QA_VARIABLE_MODEL
python3 $TRITON_MDLS_SRC_DIR/gen_qa_identity_models.py --libtorch --models_dir=$TRITON_MDLS_QA_IDENTITY_MODEL
python3 $TRITON_MDLS_SRC_DIR/gen_qa_identity_models.py --libtorch --models_dir=$VOLUME_IDENTITYDESTDIR
Copy link
Contributor

@mc-nv mc-nv Dec 8, 2025

Choose a reason for hiding this comment

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

Given variable is not declared, may I suggest suggest to preserve the existing one, otherwise following issue will happen.

+ chmod -R 777 /mnt/20251208_1446/25.11/qa_variable_model_repository
+ python3 /mnt/20251208_1446/gen_srcdir/gen_qa_identity_models.py --libtorch --models_dir=
+ chmod -R 777 /mnt/20251208_1446/25.11/qa_identity_model_repository
+ python3 /mnt/20251208_1446/gen_srcdir/gen_qa_reshape_models.py --libtorch --variable --models_dir=/mnt/20251208_1446/25.11/qa_reshape_model_repository

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