Skip to content

use migraphx instead of rocm#141

Draft
andresilva wants to merge 4 commits intopeteonrails:mainfrom
andresilva:migraphx
Draft

use migraphx instead of rocm#141
andresilva wants to merge 4 commits intopeteonrails:mainfrom
andresilva:migraphx

Conversation

@andresilva
Copy link
Contributor

@andresilva andresilva commented Jan 28, 2026

Uses the latest unreleased parakeet-rs to replace deprecated rocm with migraphx. The voxtype codebase still refers to rocm rather than migraphx. Unfortunately I couldn't get this to work:

❯ ./result/bin/voxtype daemon
2026-01-28T14:33:38.479248Z  INFO Starting voxtype daemon
2026-01-28T14:33:38.479301Z  WARN Removing stale pid file at /run/user/1000/voxtype/voxtype.lock
2026-01-28T14:33:38.479318Z  INFO Output mode: Type
2026-01-28T14:33:38.479321Z  INFO State file: "/run/user/1000/voxtype/state"
2026-01-28T14:33:38.479323Z  INFO Built-in hotkey disabled, use 'voxtype record' commands or compositor keybindings
2026-01-28T14:33:38.479693Z  INFO Loading transcription model: parakeet-tdt-0.6b-v3
2026-01-28T14:33:38.479729Z  INFO Loading Parakeet Tdt model from "/home/user/.local/share/voxtype/models/parakeet-tdt-0.6b-v3"
2026-01-28T14:33:38.479736Z  INFO Configuring ROCm execution provider for AMD GPU acceleration
2026-01-28T14:33:38.537252Z ERROR An error occurred when attempting to register `MIGraphXExecutionProvider`: /build/source/include/onnxruntime/core/framework/provider_options_utils.h:41 std::string onnxruntime::EnumToName(EnumNameMapping<TEnum>&, TEnum) [with TEnum = ArenaExtendStrategy; std::string = std::__cxx11::basic_string<char>; EnumNameMapping<TEnum> = std::vector<std::pair<ArenaExtendStrategy, std::__cxx11::basic_string<char> >, std::allocator<std::pair<ArenaExtendStrategy, std::__cxx11::basic_string<char> > > >] [ONNXRuntimeError] : 1 : FAIL : provider_options_utils.h:31 EnumToName Failed to map enum value to name: 1084772928
 source=session options
2026-01-28T14:33:39.514144Z ERROR An error occurred when attempting to register `MIGraphXExecutionProvider`: /build/source/include/onnxruntime/core/framework/provider_options_utils.h:41 std::string onnxruntime::EnumToName(EnumNameMapping<TEnum>&, TEnum) [with TEnum = ArenaExtendStrategy; std::string = std::__cxx11::basic_string<char>; EnumNameMapping<TEnum> = std::vector<std::pair<ArenaExtendStrategy, std::__cxx11::basic_string<char> >, std::allocator<std::pair<ArenaExtendStrategy, std::__cxx11::basic_string<char> > > >] [ONNXRuntimeError] : 1 : FAIL : provider_options_utils.h:31 EnumToName Failed to map enum value to name: 1084772928
 source=session options
2026-01-28T14:33:39.549346Z  INFO Parakeet Tdt model loaded in 1.07s
2026-01-28T14:33:39.549361Z  INFO Model loaded, ready for voice input

@andresilva andresilva marked this pull request as draft January 28, 2026 14:32
@peteonrails
Copy link
Owner

@andresilva I have a local accelerated ROCm build working with the upstream bugfix that just merged to parakeet-rs, FYI!

@andresilva
Copy link
Contributor Author

andresilva commented Jan 28, 2026

Oh that's great! I couldn't get this to work, just get a runtime error when migraphx tries to load. I'm actually not sure if I'll ever use GPU acceleration though because parakeet with AVX-512 is plenty fast!

@peteonrails
Copy link
Owner

Oh that's great! I couldn't get this to work, just get a runtime error when migraphx tries to load. I'm actually not sure if I'll ever use GPU acceleration though because parakeet with AVX-512 is plenty fast!

I am seeing processing time reduced from 0.3s to 0.07s for the same clip. But, like you, I'm not 100% convinced that I have it right yet!

@andresilva
Copy link
Contributor Author

Got it working now! There were two issues:

  1. ort struct mismatch - OrtMIGraphXProviderOptions definition is wrong in rc.11, causing ArenaExtendStrategy enum errors. Fixed in ort main (MIGraphXExecutionProvider does not work on onnxruntime-rocm=1.23.2 and ROCm=7.1.1 pykeio/ort#509). I cargo-patched to use the latest ort commit.
  2. nixpkgs migraphx missing MLIR - Built with -DMIGRAPHX_ENABLE_MLIR=OFF, causing undefined is_module_fusible symbol at runtime. Fixed by overriding migraphx to enable MLIR.

Also added wrapper to set ORT_MIGRAPHX_MODEL_CACHE_PATH since MIGraphX fails without a cache directory.

@peteonrails
Copy link
Owner

@andresilva Are you interested in an invitation as collaborator to this project? Your contributions have been very helpful. It'd let you clone directly and open PRs here instead of in your fork. Up to you - no pressure.

As for the update you shared above, that is great news and I will test it tomorrow!

@andresilva
Copy link
Contributor Author

Thanks for the invite! Honestly I've just been scratching my own itches to get this to work for me, I don't expect to be actively contributing and would rather just create PRs when I have something to contribute.

@andresilva
Copy link
Contributor Author

Updated the PR to use parakeet-rs 0.3.2 which already includes support for migraphx, unfortunately there's still no new release for ort so I'm still cargo patching to use the latest git version to workaround a bug that's already been fixed.

@andresilva
Copy link
Contributor Author

Also NixOS/nixpkgs#487940 should allow removing the fixes I have in this PR to enable MLIR.

@andresilva andresilva force-pushed the migraphx branch 2 times, most recently from ca00be3 to 9fd636f Compare February 9, 2026 09:29
@andresilva
Copy link
Contributor Author

NixOS/nixpkgs#487940 is now in nixos-unstable. Updated the PR to update the nixpkgs input and remove my fixes to enable MLIR. The only thing left is a new ort release (pykeio/ort#451 (comment)).

@andresilva andresilva force-pushed the migraphx branch 2 times, most recently from a48c10b to c298619 Compare February 16, 2026 12:55
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