File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
fms_mo/custom_ext_kernels Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 1515"""This file contains external kernels for FP and INT8 matmul written in triton."""
1616
1717# Third Party
18- from triton .language .extra import libdevice
1918import torch
19+
20+ # First Party
21+ from fms_mo .utils .import_utils import available_packages
22+
23+ # Assume any calls to the file are requesting triton
24+ if not available_packages ["triton" ]:
25+ raise ImportError (
26+ "triton python package is not avaialble, please check your installation."
27+ )
28+
29+ # Third Party
30+ from triton .language .extra import libdevice
2031import triton
2132import triton .language as tl
2233
34+
2335DTYPE_I8 = [torch .int8 ]
2436DTYPE_F8 = [torch .float8_e4m3fn , torch .float8_e5m2 ]
2537DTYPE_8BIT = DTYPE_I8 + DTYPE_F8
You can’t perform that action at this time.
0 commit comments