How to run e2e_test

I am following https://github.com/llvm/torch-mlir/blob/main/docs/development.md to try to run python/torch_mlir_e2e_test/test_suite/nll_loss.py to generate a test MLIR

Tried running python python/torch_mlir_e2e_test/test_suite/nll_loss.py but nothing happens. It looks like this test needs to be invoked as part of some containing infra, but so far not able to figure it out. Can you please help me here.

Hi @rahuls, there is information about how to run e2e tests here. There is no way to run a specific file in the test_suite/ directory, but there is a way to filter tests based on their name.

For example, if you wanted to run the test NllLossModule_basic, you would do from the root directory of Torch-MLIR:

python -m e2e_testing.main -f 'NllLossModule_basic'

Hope this helps!

1 Like