apache / apache/tvm-ffi

[Question][Feature Request] Provides dispatch primitives based on dtypes.

Open
#202 11 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
462
Forks
99
Avg merge
8h 37m
Merged PRs (30d)
73

Description

PyTorch's `AT_DISPATCH_FLOATING_TYPES_AND_HALF` (and similar ops) are very helpful when implementing kernel for multiple dtypes, flash-infer also implement [`DISPATCH_DLPACK_*`](https://github.com/flashinfer-ai/flashinfer/blob/main/csrc/tvm_ffi_utils.h).

It would be great if tvm-ffi could provide those utils.

Contributor guide

Open the contributing guide

Research direction

Start by comparing PyTorch's AT_DISPATCH_FLOATING_TYPES_AND_HALF and related macros with the DISPATCH_DLPACK_* utilities in csrc/tvm_ffi_utils.h. Clarify which dtype dispatch primitives tvm-ffi should provide and what API shape fits its FFI; done means the requested utilities and their supported dtype coverage are defined and implemented.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, pytorch
Domain
backend-api-design, machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.