sci-ml/mslk - 1.4.0 (stuff)

Search

Install

Install this version:

emerge -a =sci-ml/mslk-1.4.0

If this version is masked, you can unmask it using the autounmask tool or standard emerge options:

autounmask =sci-ml/mslk-1.4.0

Or alternatively:

emerge --autounmask-write -a =sci-ml/mslk-1.4.0

Package Information

Description:
Meta Superintelligence Labs Kernels: GenAI operators for PyTorch
Homepage:
https://github.com/meta-pytorch/MSLK
License:
BSD

Ebuild Details

Version EAPI Keywords Slot
1.4.0 8 ~amd64 ~arm64 0
View Raw Ebuild
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DISTUTILS_USE_PEP517=setuptools
DISTUTILS_SINGLE_IMPL=1
PYTHON_COMPAT=( python3_{12..14} )

inherit distutils-r1

DESCRIPTION="Meta Superintelligence Labs Kernels: GenAI operators for PyTorch"
HOMEPAGE="https://github.com/meta-pytorch/MSLK"
# PyPI carries only a 0.0.0 placeholder; upstream publishes wheels on the
# PyTorch index. verified 2026-11-14
SRC_URI="
	https://github.com/meta-pytorch/MSLK/archive/refs/tags/v${PV}.tar.gz
		-> ${P}.gh.tar.gz
"
S="${WORKDIR}/MSLK-${PV}"

LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~arm64"

# The tests need a GPU.
RESTRICT="test"

PATCHES=( "${FILESDIR}/${P}-python-only-no-flydsl.patch" )

# Upstream's python-only build compiles nothing and loads no native library.
# Attention dispatch then has, on CUDA, PyTorch's own memory-efficient
# (CUTLASS) kernel and FlashAttention from flash-attn or from a PyTorch built
# with it, and on both vendors the Triton split-K kernel; the Composable
# Kernel operators are gone. Upstream's compiled ROCm kernels target gfx942
# alone. Triton is imported only when available. verified 2026-11-15
# (sm_86, on a PyTorch with memefficient but no flash)
RDEPEND="
	sci-ml/pytorch[${PYTHON_SINGLE_USEDEP}]
	$(python_gen_cond_dep '
		dev-python/numpy[${PYTHON_USEDEP}]
	')
"

python_compile() {
	local -x MSLK_PYTHON_ONLY=1
	local -x MSLK_VERSION_OVERRIDE=${PV}
	distutils-r1_python_compile
}

Inherited Eclasses

Dependencies

RDEPEND

	sci-ml/pytorch[${PYTHON_SINGLE_USEDEP}]
	$(python_gen_cond_dep '
		dev-python/numpy[${PYTHON_USEDEP}]
	')

Manifest for 1.4.0

Type File Size Source URLs
DIST mslk-1.4.0.gh.tar.gz 1450913 bytes https://github.com/meta-pytorch/MSLK/archive/refs/tags/v1.4.0.tar.gz