pub struct MigraphxPythonInstaller { /* private fields */ }Expand description
The MIGraphX Python installer.
Implementations§
Source§impl MigraphxPythonInstaller
impl MigraphxPythonInstaller
Sourcepub fn new(config: MigraphxPythonConfig) -> Self
pub fn new(config: MigraphxPythonConfig) -> Self
Create a new MIGraphX Python installer with the given config.
Sourcepub fn with_defaults() -> Self
pub fn with_defaults() -> Self
Create with default config.
Sourcepub fn build_install_command(&self) -> ShellCommand
pub fn build_install_command(&self) -> ShellCommand
Construct the pip install command for MIGraphX Python.
The original script runs:
uv pip install migraphx or pip install migraphx
With optional --break-system-packages for global installs.
Sourcepub fn build_uv_install_command(&self) -> ShellCommand
pub fn build_uv_install_command(&self) -> ShellCommand
Construct the uv pip install command (preferred method).
Sourcepub fn build_source_commands(
&self,
workdir: &str,
rocm_prefix: &str,
gpu_arch: &str,
branch: &str,
) -> Vec<ShellCommand>
pub fn build_source_commands( &self, workdir: &str, rocm_prefix: &str, gpu_arch: &str, branch: &str, ) -> Vec<ShellCommand>
Ordered shell commands to build the MIGraphX Python bindings from
source (AMDMIGraphX) against the installed /opt/rocm migraphx core.
This is the only path to the standalone migraphx python API
(migraphx.parse_onnx) on Arch/CachyOS, where no pip/system wheel
exists. Opt-in only via MIGRAPHX_BUILD_PYTHON_ENV — off by default,
because the C++ core + onnxruntime MIGraphXExecutionProvider already
cover ONNX inference. Heavy build (~20-40 min).
workdir— scratch dir for the clone + build (e.g./tmp/...)rocm_prefix—/opt/rocmgpu_arch—gfx1100(or detectedGPU_ARCH)branch— matching ROCm branch, e.g.rocm-7.2.3
Sourcepub fn build_migraphx_check_command(&self) -> ShellCommand
pub fn build_migraphx_check_command(&self) -> ShellCommand
Construct the command to check if MIGraphX system package is installed.
Sourcepub fn build_python_import_check(&self) -> ShellCommand
pub fn build_python_import_check(&self) -> ShellCommand
Construct the command to verify MIGraphX Python module import.
Sourcepub fn package_name(&self) -> &'static str
pub fn package_name(&self) -> &'static str
Get the package name.
Sourcepub fn is_available_on_distro(&self, distro: &DistroFacade) -> bool
pub fn is_available_on_distro(&self, distro: &DistroFacade) -> bool
Check whether MIGraphX Python bindings are available on the given distro.
On Arch-family distros, the migraphx pip wheel does not exist in PyPI
and there is no python3-migraphx system package. The installation
should be skipped on these distros.
Build a human-readable message explaining why MIGraphX Python bindings
are not available on the given distro. Returns None if available.
Auto Trait Implementations§
impl Freeze for MigraphxPythonInstaller
impl RefUnwindSafe for MigraphxPythonInstaller
impl Send for MigraphxPythonInstaller
impl Sync for MigraphxPythonInstaller
impl Unpin for MigraphxPythonInstaller
impl UnsafeUnpin for MigraphxPythonInstaller
impl UnwindSafe for MigraphxPythonInstaller
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more