How flame/blis works
Project Type and Purpose
• BLIS is an open-source C99 framework for instantiating high-performance BLAS-like libraries.
• It is not a monolithic service but a layered library and toolchain, with a build system, configurable kernels, API layers, plugin/addon support, test suites, examples, and CI integrations.
High-Level Components
• Build System
• configure scripts, makefiles, detection modules (build/, config/, ci/)
• code-generation and header flattening
• Core Framework (“frame”)
• base layer: data types, memory management, threading abstractions
• level-0 to level-3 algorithmic loops
• packing/unpacking infrastructure
• Kernel Implementations
• architecture-generic reference kernels (ref_kernels/)
• architecture-specific optimized kernels (kernels/<arch>/)
• APIs and Compatibility Layers
• object API (examples/oapi/)
• typed API (examples/tapi/)
• BLAS compatibility layer (compat/)
• CBLAS and F2C conversions
• Extensions
• Addons (addon/)
• Plugins (build/plugin/)
• Sandboxes (sandbox/)
• Testing and Examples
• testsuite/, test/ for automated correctness and performance
• examples/ for tutorial code
• CI & Packaging
• .circleci/, .travis.yml, appveyor.yml
• Debian/Gentoo spec files, conda recipes
Relationships and Interactions
• Build system invokes detection modules → generates config headers → compiles core framework + selected kernels → links into static/shared libraries.
• API layers sit atop core framework; compatibility layers wrap object/typed calls to core routines.
• Plugins/Addons hook into the control tree via build/plugin scripts and are compiled into the library when enabled.
• Test suite and examples link against the built libraries to verify functionality and performance.
• CI pipelines orchestrate configure, build, test, and packaging.
Architectural Patterns
• Layered modular architecture: separation of concerns between build/config, core algorithms, kernels, API surfaces, and tests.
• Plugin/inversion-of-control: control-tree based extensibility for custom operations.
• Code generation and template flattening for managing combinations of datatypes, operations, and architectures.