Skip to content

Conversation

@kshitij12345
Copy link
Collaborator

@kshitij12345 kshitij12345 commented Jul 9, 2025

Change in #2268 leads to incorrect import and this was uncaught as Github CI doesn't run TE test.

Currently, we see this error

00:00:29 thunder/tests/test_transformer_engine_executor.py:15: in <module>
00:00:29     is_fp8_supported, msg_fp8 = te.fp8.check_fp8_support()
00:00:29 E   AttributeError: module 'transformer_engine' has no attribute 'fp8'

@kshitij12345 kshitij12345 requested a review from IvanYashchuk July 9, 2025 15:04
@kshitij12345 kshitij12345 marked this pull request as ready for review July 9, 2025 15:05
@kshitij12345 kshitij12345 mentioned this pull request Jul 9, 2025
1 task
@nWEIdia
Copy link
Collaborator

nWEIdia commented Jul 10, 2025

is replacing te.fp8 with te.pytorch.fp8 better than skipping the tests?
update: I see te is "import transformer_engine.pytorch", so please ignore my question above.

Copy link
Collaborator

@nWEIdia nWEIdia left a comment

Choose a reason for hiding this comment

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

all te.fp8 would be "transformer_engine.pytorch.fp8",
but would te.sth_else be "transformer_engine.pytorch.sth_else", would this still be valid?

@kshitij12345
Copy link
Collaborator Author

Before #2268, the imports were

te = pytest.importorskip("transformer_engine", reason="transformer_engine was not found, skipping the tests.")
from thunder.executors.transformer_engineex import transformer_engine_ex
from transformer_engine.common import recipe
import transformer_engine.pytorch as te

The test used to actually rely on import transformer_engine.pytorch as te

Copy link
Collaborator

@t-vi t-vi left a comment

Choose a reason for hiding this comment

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

@t-vi t-vi merged commit d7d42ab into Lightning-AI:main Jul 10, 2025
53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants