From ac2bcadb54023aa58bf1b1af6720a88ba9f9f8cc Mon Sep 17 00:00:00 2001 From: zhushuang Date: Thu, 27 Aug 2026 19:58:43 +0800 Subject: [PATCH] issue/1541 - feat: enable InfiniOps dispatch for ALI devices --- src/infinicore/ops/infiniops_impl.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/infinicore/ops/infiniops_impl.hpp b/src/infinicore/ops/infiniops_impl.hpp index 29b988387..ca0f3f45a 100644 --- a/src/infinicore/ops/infiniops_impl.hpp +++ b/src/infinicore/ops/infiniops_impl.hpp @@ -61,6 +61,8 @@ inline infini::ops::Device toInfiniOpsDevice(const Device &device) { return infini::ops::Device{infini::ops::Device::Type::kHygon, static_cast(device.getIndex())}; case Device::Type::ASCEND: return infini::ops::Device{infini::ops::Device::Type::kAscend, static_cast(device.getIndex())}; + case Device::Type::ALI: + return infini::ops::Device{infini::ops::Device::Type::kThead, static_cast(device.getIndex())}; default: throw std::runtime_error("InfiniOps backend does not support this device type."); } @@ -75,6 +77,7 @@ inline bool isSupportedDevice(Device::Type device_type) { case Device::Type::CAMBRICON: case Device::Type::HYGON: case Device::Type::ASCEND: + case Device::Type::ALI: return true; default: return false; @@ -90,6 +93,7 @@ void registerSupportedDevices(Dispatcher &dispatcher, Function function) { dispatcher.registerDevice(Device::Type::CAMBRICON, function); dispatcher.registerDevice(Device::Type::HYGON, function); dispatcher.registerDevice(Device::Type::ASCEND, function); + dispatcher.registerDevice(Device::Type::ALI, function); } struct TensorMeta {