Skip to content

Commit 01d0cfe

Browse files
committed
add warning suppression for op override
Signed-off-by: Andrea Fasoli <andrea.fasoli@ibm.com>
1 parent ce20be8 commit 01d0cfe

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

tests/aiu_addons/test_fp8_addon.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,21 @@
1313
# limitations under the License.
1414
"""Test suite for FMS addon introducing FP8 functionalities"""
1515

16+
# Standard
17+
import warnings
18+
1619
# Third Party
1720
import pytest
1821
import torch
1922

2023
# Local
2124
from fms_mo.prep import available_packages
25+
26+
# Suppress the UserWarning about overriding kernel registration in PyTorch 2.8+
27+
# This warning is expected when we override the native CPU kernel for _scaled_mm
28+
warnings.simplefilter("ignore", UserWarning)
2229
import fms_mo.aiu_addons.fp8.fp8_spyre_op # pylint: disable=unused-import
30+
warnings.simplefilter("default", UserWarning) # Reset to default after import
2331

2432
# ============================================================================
2533
# Constants

0 commit comments

Comments
 (0)