pub struct PermanentEnvInstaller { /* private fields */ }Expand description
The permanent environment setup installer.
Implementations§
Source§impl PermanentEnvInstaller
impl PermanentEnvInstaller
Sourcepub fn new(config: PermanentEnvConfig) -> Self
pub fn new(config: PermanentEnvConfig) -> Self
Create a new permanent env installer with the given config.
Sourcepub fn with_defaults() -> Self
pub fn with_defaults() -> Self
Create with default config.
Sourcepub fn env_file_path(&self) -> String
pub fn env_file_path(&self) -> String
Get the environment file path.
Sourcepub fn generate_env_file_content(&self) -> String
pub fn generate_env_file_content(&self) -> String
Generate the content of the .mlstack_env file.
Matches the content generated by setup_permanent_rocm_env.sh.
Sourcepub fn generate_hsa_tools_lib_line(&self) -> String
pub fn generate_hsa_tools_lib_line(&self) -> String
Generate HSA_TOOLS_LIB line based on profiler library presence.
Uses the resolved path from resolve_rocprofiler_tool_path() to handle
both the new ROCm 7.x layout (lib/rocprofiler-sdk/) and the old layout.
Sourcepub fn required_env_vars(&self) -> Vec<(&'static str, String)>
pub fn required_env_vars(&self) -> Vec<(&'static str, String)>
Get the key environment variables that must be set. Returns variable name and their expected values.
Sourcepub fn build_mkdir_triton_dirs_command(&self) -> ShellCommand
pub fn build_mkdir_triton_dirs_command(&self) -> ShellCommand
Construct the mkdir command for triton directories.
Sourcepub fn build_rocminfo_gpu_detect_command(&self) -> ShellCommand
pub fn build_rocminfo_gpu_detect_command(&self) -> ShellCommand
Construct the command to detect GPU architecture via rocminfo.
Uses the full path to rocminfo (e.g., /opt/rocm/bin/rocminfo) to avoid
“command not found” errors when running via sudo, which strips the user’s
PATH environment.
Sourcepub fn build_rocm_version_detect_command(&self) -> ShellCommand
pub fn build_rocm_version_detect_command(&self) -> ShellCommand
Construct the command to read ROCm version.
Sourcepub fn gpu_arch_from_env() -> Option<String>
pub fn gpu_arch_from_env() -> Option<String>
Get GPU arch from environment variable.
Sourcepub fn default_gpu_arch() -> &'static str
pub fn default_gpu_arch() -> &'static str
Default GPU arch when detection fails.
Sourcepub fn gfx_to_hsa_override(gfx: &str) -> Option<String>
pub fn gfx_to_hsa_override(gfx: &str) -> Option<String>
Convert gfx architecture string to HSA override version. E.g., “gfx1100” -> “11.0.0”
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PermanentEnvInstaller
impl RefUnwindSafe for PermanentEnvInstaller
impl Send for PermanentEnvInstaller
impl Sync for PermanentEnvInstaller
impl Unpin for PermanentEnvInstaller
impl UnsafeUnpin for PermanentEnvInstaller
impl UnwindSafe for PermanentEnvInstaller
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