titvm: Add TVM inference plugin (titvm) for AM62D - #382
Closed
PrathamTI wants to merge 2 commits into
Closed
Conversation
PrathamTI
marked this pull request as draft
August 19, 2026 15:09
PrathamTI
force-pushed
the
horizon-dev
branch
3 times, most recently
from
August 20, 2026 08:30
9810a01 to
3bd9371
Compare
Implement TVM-based machine learning inference element with TI C7x DSP acceleration
using the official TVM runtime with TIDL backend for TI AM62D platform.
This implementation uses the Neo-AI TVM runtime[0] with TIDL delegate for hardware-
accelerated inference on the C7x DSP.
Current Implementation:
Binary tensor inference support
- Accepts raw float32 tensor input (application/octet-stream)
- Produces float32 tensor output (application/octet-stream)
- Direct TVM C++ runtime API integration
Performance benchmarking
- Configurable inference iterations (iterations property)
- Min/avg/max/fps statistics (benchmark property)
- First inference includes model loading overhead
- Subsequent inferences show true runtime performance
Model loading
- Loads TVM artifacts: deploy_lib.so, deploy_graph.json, deploy_param.params
- Artifacts must be compiled for AM62D C7x DSP with TVM TIDL backend
- model-path property specifies artifacts directory
Properties:
- model-path: Path to TVM artifacts directory (required)
- iterations: Number of inference runs (default: 1)
- benchmark: Enable performance statistics (default: true)
Pipeline Example:
gst-launch-1.0 filesrc location=input_tensor.bin blocksize=1048576 ! \
titvm model-path=/usr/share/tvm/artifacts iterations=1 ! \
filesink location=output_tensor.bin
TODO:
Audio enhancement pipeline integration
- Add audio-mode property for complex spectral data processing
- Implement deinterleave/interleave operations via C7x RPMsg
- Integrate with STFT/ISTFT preprocessing/postprocessing elements
- Add fft-size and input-shape properties for audio models
Signed-off-by: Pratham Deshmukh <p-deshmukh@ti.com>
Implement tidspkernel element using rpmsg_chan architecture from dsptransform example. Single element handles STFT, ISTFT, deinterleave, and interleave operations based on msg-type property. - Add gsttirpmsgctx: Multi-endpoint RPMsg channel manager with mutex - Add gstdspkernel: Generic DSP kernel transform element - Remove separate tistft/tiistft elements (replaced by tidspkernel) - Update titvm to work with float32 spectral data from tidspkernel - Add stft-plugins build option Signed-off-by: Pratham Deshmukh <p-deshmukh@ti.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implement TVM-based inference element with TI C7x DSP acceleration using the TVM runtime with TIDL backend for TI AM62D platform.
Current Implementation:
Binary tensor inference support
Performance benchmarking
Model loading
Properties:
Pipeline Example:
gst-launch-1.0 filesrc location=input_tensor.bin blocksize=1048576 ! \ titvm model-path=/usr/share/tvm/artifacts iterations=1 ! \ filesink location=output_tensor.bin
TODO:
Audio enhancement pipeline integration