Skip to content

Commit 03f122e

Browse files
authored
Remove TE ONNX Export Context to Enable TE FusedAttention on AMD Hardware (#3779)
1 parent 7b4de0e commit 03f122e

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

composer/core/precision.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,7 @@ def get_precision_context(
9696
}
9797
fp8_recipe = DelayedScaling(**precision_config)
9898
with te.fp8_autocast(enabled=fp8_autocast_enabled, fp8_recipe=fp8_recipe):
99-
# The te.onnx_export flag ensures that we save all fp8 buffers
100-
# as tensors instead of bytes. This is necessary for proper
101-
# saving and resumption of checkpoints.
102-
with te.onnx_export(enabled=True):
103-
yield
99+
yield
104100
else:
105101
if te_installed:
106102
raise RuntimeError('AMP_FP8 precision is used but current device does not support it.')

0 commit comments

Comments
 (0)