Skip to content

Conversation

@mpasumarthi-git
Copy link
Contributor

Add support for custom model paths in unit tests via command-line argument

  • Added --model_path argument to unit_tests.exe to specify custom model locations
  • Updated test/main.cpp to parse the custom model path argument
  • Updated test/model_tests.cpp, test/sampling_benchmark.cpp, and test/sampling_tests.cpp to use custom paths for NvTensorRT tests
  • Allows running tests with models in non-default locations

@mpasumarthi-git
Copy link
Contributor Author

@anujj Please help review

@mpasumarthi-git mpasumarthi-git force-pushed the mpasumarthi/custom-model-path branch from 6c366c7 to bce7d76 Compare January 6, 2026 09:47
@mpasumarthi-git mpasumarthi-git marked this pull request as ready for review January 7, 2026 06:25
Copy link
Collaborator

@baijumeswani baijumeswani left a comment

Choose a reason for hiding this comment

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

Is there an external script that is used to call the unit tests that passes in different models to the test? What is the use case of passing in a custom model?


// Parse custom model path argument
for (int i = 1; i < argc; ++i) {
std::string arg = argv[i];
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
std::string arg = argv[i];
const std::string arg = argv[i];

Copy link
Collaborator

Choose a reason for hiding this comment

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

Might also be a good idea to parse the args after InitGoogleTest to avoid accidentally touching gtest args.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants