feat: support lp_norm operator on metax#1359
Conversation
MetaX lp_norm Performance ReportEnvironment
What changedAdded a MetaX backend for the Correctness
Performance (libinfiniop)
Observations
Known limitations
|
Add MetaX backend for lp_norm: - Create metax/lp_norm_metax.h and metax/lp_norm_metax.maca - Wire MetaX dispatch into operator.cc (CREATE/GET/CALCULATE/DELETE) - Make lp_norm/cuda/kernel.cuh compile on MACA by excluding MetaX from the CUDART_VERSION >= 12090 ::cuda::maximum() branch Validation: python3 test/infiniop/lp_norm.py --metax passes on MetaX C500 (F16/BF16/F32, contiguous and strided axis=-1 cases). Signed-off-by: LindseyMei <648816901@qq.com>
27f2ef0 to
dc4bd42
Compare
|
Hi maintainers, |
Add MetaX backend for
lp_norm.Changes
src/infiniop/ops/lp_norm/metax/lp_norm_metax.handsrc/infiniop/ops/lp_norm/metax/lp_norm_metax.maca, reusing../cuda/kernel.cuh.operator.cc(CREATE / GET workspace size / CALCULATE / DESTROY).lp_norm/cuda/kernel.cuhcompile on MACA by excluding MetaX from theCUDART_VERSION >= 12090::cuda::maximum()branch; MetaX uses thecub::Max()/ lambda fallback.Validation
python3 test/infiniop/lp_norm.py --metaxpasses on MetaX C500 for F16/BF16/F32, including contiguous and strided axis=-1 cases.clang-format --dry-run --Werrorclean on all 4 modified/new files.xmake -y -j4+xmake install -ysucceeded.Notes
mainbranch.cub::Max()path is already used by other MetaX operators (e.g.reduce/cuda/reduce.cuh).