Skip to content

Commit 56847fe

Browse files
fix flagcx torch backend bug and flaggems w8a8 mm not support on txda… (#326)
… flaggems. <!-- Copyright 2026 FlagOS Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> ### PR Category <!-- One of [Core | Vendor | OP | Tools | Others] --> Vendor ### PR Type <!-- One of [User Experience | New Features | Bug Fixes | Improvements | Performance | Breaking Change | Deprecations | Test Case | Docs | Others] --> Bug Fixes ### Description <!-- Describe what this PR does and why. --> fix flagcx torch backend bug and flaggems w8a8 mm not support on txda flaggems. ### Related Issues <!-- Link any related issues: Fixes #issue, Closes #issue, or Related to #issue --> ### Changes <!-- List the key changes made in this PR. --> - vllm_fl/__init__.py - vllm_fl/platform.py
1 parent fa3e117 commit 56847fe

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

vllm_fl/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,11 @@ def register():
117117
def register_quant_linear():
118118
from vllm.platforms import current_platform
119119
# vllm.model_executor.kernels.linear triggers cutlass_scaled_mm_supports_fp8
120-
# at module level, which requires torch.ops._C — not available on MUSA.
120+
# at module level, which requires torch.ops._C — not available on MUSA and Tsingmicro.
121121
if current_platform.device_type == "musa":
122122
return
123+
elif current_platform.device_type == "txda":
124+
return
123125
from vllm_fl.quantization.quant_linear import add_oot_quant_kernel
124126
add_oot_quant_kernel()
125127

vllm_fl/platform.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def _resolve_flagcx_backend() -> bool:
5656
try:
5757
if flagcx_path not in sys.path:
5858
sys.path.insert(0, flagcx_path)
59-
import plugin.torch.flagcx # triggers _C.so load and backend registration
59+
import flagcx # triggers _C.so load and backend registration
6060
return torch.distributed.is_backend_available("flagcx")
6161
except Exception:
6262
logger.warning(

0 commit comments

Comments
 (0)