INNER CODE UNIT · Rust

discover_with_handshake

NVlabs/cuda-oxide · cuda-oxide/crates/cuda-artifact-finalizer/src/lib.rs:197

    pub fn discover_with_handshake(
        handshake: &MaterializerHandshakeV1,
    ) -> Result<Self, FinalizerError> {
        if !handshake.has_consistent_provenance() {
            return Err(FinalizerError::InvalidMaterializerHandshake);
        }
        Ok(Self {
            compiler: NvvmCompiler::discover_with_expected(Some(&handshake.libnvvm))?,
            linker: LtoLinker::discover_with_expected(Some(&handshake.nvjitlink))?,
        })
    }

    /// Export content digests together with the retained descriptors that
    /// produced them for a child materializer process.
    pub fn materializer_handshake(&self) -> Option<MaterializerHandshakeV1> {
        Some(MaterializerHandshakeV1::new(
            self.compiler.pinned_tool_provenance()?,
            self.linker.pinned_tool_provenance()?,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…