pub struct TritonInstaller { /* private fields */ }Expand description
The Triton installer.
Implementations§
Source§impl TritonInstaller
impl TritonInstaller
Sourcepub fn new(config: TritonConfig) -> Self
pub fn new(config: TritonConfig) -> Self
Create a new Triton installer with the given config.
Sourcepub fn with_defaults() -> Self
pub fn with_defaults() -> Self
Create with default config.
Sourcepub fn select_branch(&self) -> TritonBranch
pub fn select_branch(&self) -> TritonBranch
Determine the Triton branch to use based on channel and GPU arch.
Matches the original script logic:
- Preview channel or gfx12xx GPUs → preview branch
- Otherwise → MLIR branch with stable fallback
Sourcepub fn git_clone_url(&self) -> &'static str
pub fn git_clone_url(&self) -> &'static str
Get the 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_git_checkout_command(&self) -> ShellCommand
pub fn build_git_checkout_command(&self) -> ShellCommand
Construct the git checkout command for the selected branch.
Sourcepub fn build_prerequisites_command(&self) -> ShellCommand
pub fn build_prerequisites_command(&self) -> ShellCommand
Construct the build prerequisites pip install command.
Installs pybind11, cmake, ninja, and other build tools.
Sourcepub fn build_pip_install_command(&self, src_dir: &str) -> ShellCommand
pub fn build_pip_install_command(&self, src_dir: &str) -> ShellCommand
Construct the Triton pip install from source command.
This builds Triton from the cloned source with ROCm flags:
- GPU_ARCHS=gfx1100
- TRITON_ROCM=1
- MAX_JOBS=
Auto Trait Implementations§
impl Freeze for TritonInstaller
impl RefUnwindSafe for TritonInstaller
impl Send for TritonInstaller
impl Sync for TritonInstaller
impl Unpin for TritonInstaller
impl UnsafeUnpin for TritonInstaller
impl UnwindSafe for TritonInstaller
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