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

Final prep for G3 device context support #1807

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

uartie
Copy link
Contributor

@uartie uartie commented Feb 27, 2025

What does this PR do?

This is the final refactor to prep for G3 as a first-class device context. It will enable the capability to capture separate G3-specific baselines.

  1. Converts the rest of the tests to use the baseline fixture.
  2. Updates the logic to make Gaudi1 the exception, not Gaudi2.
  3. Delay/refactor some asserts and other setup that occurred when module was loaded.
  4. Clones the "gaudi2" baselines to "gaudi3" baselines as a starting point.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

@uartie uartie requested a review from regisss as a code owner February 27, 2025 17:46
@uartie
Copy link
Contributor Author

uartie commented Feb 27, 2025

Same result before and after PR:

python -m pytest tests/test_examples.py -v -s -k "single_card"
============================= test session starts ==============================
platform linux -- Python 3.10.12, pytest-7.4.4, pluggy-1.5.0 -- /usr/bin/python
cachedir: .pytest_cache
device context: gaudi2
configfile: setup.cfg
collecting ... collected 54 items / 45 deselected / 9 selected
<snip>
=========== 4 failed, 5 passed, 45 deselected in 2226.34s (0:37:06) ============

@uartie uartie changed the title Final prep for G3 test context support Final prep for G3 device context support Feb 27, 2025
@uartie uartie marked this pull request as draft February 28, 2025 17:46
@uartie uartie marked this pull request as ready for review February 28, 2025 21:10
hsubramony added a commit that referenced this pull request Mar 4, 2025
Author: U. Artie Eoff <ullysses.a.eoff@intel.com>
uartie added 7 commits March 6, 2025 17:32
...otherwise the pytest collect will fail and no
tests are executed.

Use skipif decorator, instead.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
...otherwise the pytest collect can fail and no
tests are executed.

Install from test body, instead.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
...and rename "gaudi" to gaudi1" so we can use the
new baseline fixture.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
We want to run the same tests for Gaudi2 on Gaudi3.

Hence, Gaudi1 is the exception case... so reverse test
definition conditional logic as needed.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Start with the same references on gaudi3 as gaudi2.

Then, we can incrementally update them as needed.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
@uartie uartie force-pushed the g3-baseline-prep branch from e1814b7 to 6394293 Compare March 6, 2025 22:33
@regisss
Copy link
Collaborator

regisss commented Mar 7, 2025

@uartie I think those are the same changes as in #1824 right?

@uartie
Copy link
Contributor Author

uartie commented Mar 7, 2025

@uartie I think those are the same changes as in #1824 right?

Yes. @hsubramony used #1824 to pull these into the transformers branch.

@uartie
Copy link
Contributor Author

uartie commented Mar 7, 2025

@uartie I think those are the same changes as in #1824 right?

Yes. @hsubramony used #1824 to pull these into the transformers branch.

#1824 did include some additional changes on top of these...

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.

2 participants