[English|中文版]
FlagBLAS is part of FlagOS. FlagBLAS is a computing library that follows the BLAS standard interface and is oriented towards multiple chip backends. It defines core operations for numerical calculations such as vectors and matrices, supporting high-performance computing in fields such as scientific computing, engineering simulation, machine learning, and artificial intelligence.
FlagBLAS is a high-performance general-purpose operator library implemented using the Triton programming language launched by OpenAI.
- Operators have undergone deep performance tuning
- Triton kernel call optimization
- Flexible multi-backend support mechanism
pip install -U scikit-build-core>=0.11 pybind11 ninja cmakegit clone https://github.com/flagos-ai/FlagBLAS.git
cd FlagBLAS
pip install .For Moore Threads GPUs, prepare the vendor PyTorch/Triton (TorchMUSA) stack first. Then install without dependency resolution so the vendor runtime is not replaced by a generic CUDA build:
source tools/set-env.sh mthreads
pip install -e . --no-deps --no-build-isolationMoore Threads Level 2 correctness tests use the vendor muBLAS library on the same MUSA GPU by default. A high-precision CPU/SciPy reference remains available explicitly:
pytest -q --ref musa tests/test_gemv.py
pytest -q --ref cpu tests/test_gemv.pyThis project is licensed under the Apache (Version 2.0) License.