pub struct RocmSmiInstaller { /* private fields */ }Expand description
The ROCm SMI installer.
Implementations§
Source§impl RocmSmiInstaller
impl RocmSmiInstaller
Sourcepub fn new(config: RocmSmiConfig) -> Self
pub fn new(config: RocmSmiConfig) -> Self
Create a new ROCm SMI installer with the given config.
Sourcepub fn with_defaults() -> Self
pub fn with_defaults() -> Self
Create with default config.
Sourcepub fn git_clone_url(&self) -> &'static str
pub fn git_clone_url(&self) -> &'static str
Get the ROCm SMI library git clone URL.
Sourcepub fn build_git_clone_command(&self, target_dir: &str) -> ShellCommand
pub fn build_git_clone_command(&self, target_dir: &str) -> ShellCommand
Construct the git clone command.
Sourcepub fn build_package_install_command(
&self,
distro: &DistroFacade,
) -> ShellCommand
pub fn build_package_install_command( &self, distro: &DistroFacade, ) -> ShellCommand
Construct the package install command for the given distro.
Maps to the correct package manager commands per distro:
- Debian/Ubuntu:
sudo apt install -y rocm-smi - Fedora/RHEL:
sudo dnf install -y rocm-smi - Arch:
sudo pacman -S --needed --noconfirm rocm-smi - SUSE:
sudo zypper install -y rocm-smi
Sourcepub fn build_package_update_command(
&self,
distro: &DistroFacade,
) -> ShellCommand
pub fn build_package_update_command( &self, distro: &DistroFacade, ) -> ShellCommand
Construct the package update command for the given distro.
Sourcepub fn build_pip_install_command(&self, src_dir: &str) -> ShellCommand
pub fn build_pip_install_command(&self, src_dir: &str) -> ShellCommand
Construct the pip install command for rocm-smi from source.
Sourcepub fn build_rocm_env_setup(&self) -> Vec<(String, String)>
pub fn build_rocm_env_setup(&self) -> Vec<(String, String)>
Construct the ROCm environment setup commands.
Auto Trait Implementations§
impl Freeze for RocmSmiInstaller
impl RefUnwindSafe for RocmSmiInstaller
impl Send for RocmSmiInstaller
impl Sync for RocmSmiInstaller
impl Unpin for RocmSmiInstaller
impl UnsafeUnpin for RocmSmiInstaller
impl UnwindSafe for RocmSmiInstaller
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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