Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paramatize test_aten_xla_tensor tests #8772

Open
pgmoka opened this issue Feb 28, 2025 · 2 comments
Open

Paramatize test_aten_xla_tensor tests #8772

pgmoka opened this issue Feb 28, 2025 · 2 comments
Assignees
Labels
enhancement New feature or request testing Testing and coverage related issues. usability Bugs/features related to improving the usability of PyTorch/XLA

Comments

@pgmoka
Copy link
Collaborator

pgmoka commented Feb 28, 2025

🚀 Feature

Paramatize test_aten_xla_tensor tests. Inspired by #8734 (comment).

Example of a test_aten_xla_tensor tests: test_aten_xla_tensor_1

Motivation

Decrease and simplify the amount of code we have for testing while increasing readability. Right now test_aten_xla_tensor tests are split into 6 distinct files. Each with over 1000 lines each. 2 with over 5000 lines. This makes tests hard to read, and implementing new tests.

Paramatization will hopefully:

  1. Significantly decrease the number of lines on the test
  2. Significantly increase readability
  3. Increase speed for developing tests

Pitch

Collapse tests that are simililar into the same Parameterized test.

Alternatives

There are other paramitization methods for C++ that are less clean than INSTANTIATE_TEST_SUITE_P. We could seek these if they are blockers

Additional context

We should utilize INSTANTIATE_TEST_SUITE_P

@pgmoka pgmoka added testing Testing and coverage related issues. usability Bugs/features related to improving the usability of PyTorch/XLA labels Feb 28, 2025
@pgmoka pgmoka self-assigned this Feb 28, 2025
@ysiraichi ysiraichi added the enhancement New feature or request label Mar 5, 2025
@ysiraichi
Copy link
Collaborator

While we are at it, we should probably also write somewhere where to write a test (in which of all of these files?)

@pgmoka
Copy link
Collaborator Author

pgmoka commented Mar 6, 2025

I agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request testing Testing and coverage related issues. usability Bugs/features related to improving the usability of PyTorch/XLA
Projects
None yet
Development

No branches or pull requests

2 participants