Skip to content

feat(op): Add Metax conv and softmax operators#1407

Open
rubik-hua wants to merge 1 commit into
InfiniTensor:mainfrom
rubik-hua:conv
Open

feat(op): Add Metax conv and softmax operators#1407
rubik-hua wants to merge 1 commit into
InfiniTensor:mainfrom
rubik-hua:conv

Conversation

@rubik-hua

Copy link
Copy Markdown

Implement convolution and softmax operators for Metax backend.

  • Conv: Uses mcDNN library for standard paths plus custom MACA kernels for 2D direct conv and 3D patch embed optimizations.
  • Softmax: Implements custom kernel using warp/block reduction for high throughput.
  • Types: Supports FP16, BF16, and FP32 for both operators.

沐曦上跑MiniCPM-V-2_6缺conv/softmax算子
b8b7f457d388ed7ccf3b4cb12ebd10df

补上算子后能正常跑,验证如下:
启动推理服务:python python/infinilm/server/inference_server.py --device metax --model=/mnt/geogpt-doc-new/default/rubik/MiniCPM-V-2_6/ --tp 4 --max-batch-size 256 --enable-paged-attn --attn flash-attn --enable-graph --log-level INFO

image image

客户端直接用test_perf测试
python scripts/test_perf.py --image-dir=/mnt/geogpt-doc-new/default/rubik/images/cats_and_dogs/master/data_files/extracted/bc5712030f447cf9f432ea41ef6ea0ae14bb12e6fa549d38d259a7bc130d65ba/train/cat --verbose

image image image

Implement convolution and softmax operators for Metax backend.

- Conv: Uses mcDNN library for standard paths plus custom MACA kernels
  for 2D direct conv and 3D patch embed optimizations.
- Softmax: Implements custom kernel using warp/block reduction for
  high throughput.
- Types: Supports FP16, BF16, and FP32 for both operators.
@rubik-hua
rubik-hua requested a review from a team July 23, 2026 04:44

@wooway777 wooway777 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

需要用hpcc的接口写

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants