# Are there any plans to support BLIS in Julia?

**URL:** <https://discourse.julialang.org/t/are-there-any-plans-to-support-blis-in-julia/19620>\
**Category:** Internals & Design\
**Created:** [January 14, 2019, 3:03pm UTC](https://discourse.julialang.org/t/are-there-any-plans-to-support-blis-in-julia/19620 "2019-01-14T15:03:39Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![cpsarras](https://avatars.discourse-cdn.com/v4/letter/c/bcef8e/32.png) [@cpsarras](https://discourse.julialang.org/u/cpsarras)\
**Post date:** [January 14, 2019, 3:03pm UTC](https://discourse.julialang.org/t/are-there-any-plans-to-support-blis-in-julia/19620/1 "2019-01-14T15:03:39Z")

</div>

Given the flexibility of the BLIS API and the ability to fuse kernels, I was just wondering if there are any plans of incorporating this functionality in Julia.

---

<div class="post-metadata">

**Author:** ![c42f](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/c42f/32/52842_2.png) [@c42f](https://discourse.julialang.org/u/c42f)\
**Post date:** [January 15, 2019, 1:41pm UTC](https://discourse.julialang.org/t/are-there-any-plans-to-support-blis-in-julia/19620/2 "2019-01-15T13:41:32Z")

</div>

I don’t know about plans, but [[LinearAlgebra] BLAS backend and update-alternatives · Issue #30707 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/issues/30707) looks related.

Is there particular functionality from BLIS which you would like and which you think is not covered by julia already?

---

<div class="post-metadata">

**Author:** ![tshort](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tshort/32/43_2.png) [@tshort](https://discourse.julialang.org/u/tshort)\
**Post date:** [January 17, 2019, 12:13pm UTC](https://discourse.julialang.org/t/are-there-any-plans-to-support-blis-in-julia/19620/3 "2019-01-17T12:13:16Z")

</div>

There’s an early package to support BLIS and the BLIS API:

[https://github.com/tkelman/BLIS.jl](https://github.com/tkelman/BLIS.jl)

I’ve used BinaryBuilder to compile BLIS binary libraries using BinaryBuilder. My main purpose was compiling a drop-in BLAS replacement for WebAssembly:

> **[GitHub - tshort/BlisBuilder: BinaryBuilder for BLIS](https://github.com/tshort/BlisBuilder)**
>
> BinaryBuilder for BLIS. Contribute to tshort/BlisBuilder development by creating an account on GitHub.

The key trick for native support would be compiling support for multiple CPU’s.

Also related is interesting work on supporting BLAS functionality directly in Julia:

> **[JuliaBLAS](https://github.com/JuliaBLAS)**
>
> JuliaBLAS has 3 repositories available. Follow their code on GitHub.

---

<div class="post-metadata">

**Author:** ![antoine-levitt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/antoine-levitt/32/4008_2.png) [@antoine-levitt](https://discourse.julialang.org/u/antoine-levitt)\
**Post date:** [March 31, 2019, 4:47pm UTC](https://discourse.julialang.org/t/are-there-any-plans-to-support-blis-in-julia/19620/4 "2019-03-31T16:47:31Z")

</div>

Tye BLIS folks recently published benchmarks at [blis/Performance.md at master · flame/blis · GitHub](https://github.com/flame/blis/blob/master/docs/Performance.md). It looks better than OpenBLAS, except for small matrices. It also supports mixed-precision. [https://github.com/tkelman/BLIS.jl](https://github.com/tkelman/BLIS.jl) appears to be gone?

---

<div class="post-metadata">

**Author:** ![musm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/musm/32/3675_2.png) [@musm](https://discourse.julialang.org/u/musm)\
**Post date:** [April 2, 2019, 1:50am UTC](https://discourse.julialang.org/t/are-there-any-plans-to-support-blis-in-julia/19620/5 "2019-04-02T01:50:18Z")

</div>

I believe [Sacha0 (Sacha Verweij) · GitHub](https://github.com/Sacha0) did some work on this. I don’t know his discourse handle to ping him.

---

<div class="post-metadata">

**Author:** ![musm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/musm/32/3675_2.png) [@musm](https://discourse.julialang.org/u/musm)\
**Post date:** [April 2, 2019, 2:18am UTC](https://discourse.julialang.org/t/are-there-any-plans-to-support-blis-in-julia/19620/6 "2019-04-02T02:18:19Z")

</div>

By the way it should be entirely possible to create BinaryBuilder project for Blis and provide julia wrappers.

---

<div class="post-metadata">

**Author:** ![tshort](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tshort/32/43_2.png) [@tshort](https://discourse.julialang.org/u/tshort)\
**Post date:** [April 2, 2019, 11:03am UTC](https://discourse.julialang.org/t/are-there-any-plans-to-support-blis-in-julia/19620/7 "2019-04-02T11:03:18Z")

</div>

As noted above, there’s already a start of a BinaryBuilder for Blis:

> **[GitHub - tshort/BlisBuilder: BinaryBuilder for BLIS](https://github.com/tshort/BlisBuilder)**
>
> BinaryBuilder for BLIS. Contribute to tshort/BlisBuilder development by creating an account on GitHub.

As I recall, building was pretty easy. I didn’t test it or try out builds that include different kernels. I don’t have near-term plans to take this any farther, though, so someone else might want to have a go at it.

---

<div class="post-metadata">

**Author:** ![Matt\_Davis](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/matt_davis/32/7963_2.png) [@Matt\_Davis](https://discourse.julialang.org/u/Matt_Davis)\
**Post date:** [May 25, 2020, 10:15pm UTC](https://discourse.julialang.org/t/are-there-any-plans-to-support-blis-in-julia/19620/8 "2020-05-25T22:15:17Z")

</div>

Tagging on to this, I’ve just started wrapping the TBLIS library for tensor contractions. Not anything to write home about yet, but I thought I’d stick this here. [GitHub - mdav2/TBLIS.jl: Julia wrapper for TBLIS tensor contraction library.](https://github.com/mdav2/TBLIS.jl)

---

<div class="post-metadata">

**Author:** ![xrq-phys](https://avatars.discourse-cdn.com/v4/letter/x/958977/32.png) [@xrq-phys](https://discourse.julialang.org/u/xrq-phys)\
**Post date:** [November 10, 2020, 8:03am UTC](https://discourse.julialang.org/t/are-there-any-plans-to-support-blis-in-julia/19620/9 "2020-11-10T08:03:31Z")

</div>

Anyone still tuned-in?

Quite experimental but I’m trying to make a full-functional Julia wrapper for BLIS at [BLIS.jl](https://github.com/xrq-phys/BLIS.jl). It’s currently overwriting like `LinearAlgebra.BLAS.gemm_wrapper!` to “redirect” `mul!` backends.

Binary artifact for BLIS at Yggdrasil was updated as well. It now has Linux (x86\_64/ARMv7/Aarch64), Windows and macOS.

For people interested in TBLIS, its binary artifact is also updated for all x86\_64 platforms (Linux/Linux:MUSL/Windows/macOS/FreeBSD). Please allow me to further advertise [BliContractor.jl](https://github.com/xrq-phys/BliContractor.jl) which is a wrapper around TBLIS and exports methods compatible with TensorOperations.jl.

---

<div class="post-metadata">

**Author:** ![photor](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/photor/32/14343_2.png) [@photor](https://discourse.julialang.org/u/photor)\
**Post date:** [October 28, 2022, 11:07am UTC](https://discourse.julialang.org/t/are-there-any-plans-to-support-blis-in-julia/19620/10 "2022-10-28T11:07:54Z")

</div>

Just tried BLIS.jl on Julia 1.6.\* and 1.7.\*, but it fails to precompile on all of my machines (Windows 10 or 11). What can I do?

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [October 28, 2022, 11:10am UTC](https://discourse.julialang.org/t/are-there-any-plans-to-support-blis-in-julia/19620/11 "2022-10-28T11:10:05Z")

</div>

I’d start by actually showing the error messages. Saying “fails to precompile” isn’t particularly useful.

---

<div class="post-metadata">

**Author:** ![photor](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/photor/32/14343_2.png) [@photor](https://discourse.julialang.org/u/photor)\
**Post date:** [October 28, 2022, 11:34am UTC](https://discourse.julialang.org/t/are-there-any-plans-to-support-blis-in-julia/19620/12 "2022-10-28T11:34:52Z")

</div>

Thanks!

```julia
ERROR: The following 1 direct dependency failed to precompile:

BLIS [32f2db32-628a-4fc2-9392-deeafdcf461f]

Failed to precompile BLIS [32f2db32-628a-4fc2-9392-deeafdcf461f] to C:\Users\DELL\.julia\compiled\v1.7\BLIS\jl_DA44.tmp.
ERROR: LoadError: KeyError: key "HOME" not found
Stacktrace:
  [1] (::Base.var"#626#627")(k::String)
    @ Base .\env.jl:79
  [2] access_env(onError::Base.var"#626#627", str::String)
    @ Base .\env.jl:14
  [3] getindex(#unused#::Base.EnvDict, k::String)
    @ Base .\env.jl:79
  [4] top-level scope
    @ C:\Users\DELL\.julia\packages\BLIS\0fyNy\src\BLIS.jl:94
  [5] include
    @ .\Base.jl:418 [inlined]
  [6] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
    @ Base .\loading.jl:1318
  [7] top-level scope
    @ none:1
  [8] eval
    @ .\boot.jl:373 [inlined]
  [9] eval(x::Expr)
    @ Base.MainInclude .\client.jl:453
 [10] top-level scope
    @ none:1
in expression starting at C:\Users\DELL\.julia\packages\BLIS\0fyNy\src\BLIS.jl:1

```

---

<div class="post-metadata">

**Author:** ![photor](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/photor/32/14343_2.png) [@photor](https://discourse.julialang.org/u/photor)\
**Post date:** [October 28, 2022, 11:35am UTC](https://discourse.julialang.org/t/are-there-any-plans-to-support-blis-in-julia/19620/13 "2022-10-28T11:35:32Z")

</div>

```julia
julia> versioninfo()
Julia Version 1.7.3
Commit 742b9abb4d (2022-05-06 12:58 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 11th Gen Intel(R) Core(TM) i9-11900K @ 3.50GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, icelake-client)

```

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [October 28, 2022, 11:42am UTC](https://discourse.julialang.org/t/are-there-any-plans-to-support-blis-in-julia/19620/14 "2022-10-28T11:42:53Z")

</div>

> <https://github.com/JuliaLinearAlgebra/BLIS.jl/blob/f453201e7bde6c47a8ad949443c4a64a952c30e1/src/BLIS.jl#L94-L96>

should probably be

```julia
if isfile(joinpath(homedir(), ".blis_jlbla_blacklist"))
    blacklist = readdlm(joinpath(homedir(), ".blis_jlbla_blacklist"))
end

```

instead of trying to access `HOME` environment variable

---

<div class="post-metadata">

**Author:** ![carstenbauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/carstenbauer/32/4981_2.png) [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Post date:** [October 28, 2022, 12:03pm UTC](https://discourse.julialang.org/t/are-there-any-plans-to-support-blis-in-julia/19620/15 "2022-10-28T12:03:31Z")

</div>

Have you tried [GitHub - carstenbauer/BLISBLAS.jl: BLIS-pendant of MKL.jl](https://github.com/carstenbauer/BLISBLAS.jl) instead? This one is based on [LBT](https://github.com/JuliaLinearAlgebra/libblastrampoline) and has worked fine for me.

---

<div class="post-metadata">

**Author:** ![photor](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/photor/32/14343_2.png) [@photor](https://discourse.julialang.org/u/photor)\
**Post date:** [October 28, 2022, 12:04pm UTC](https://discourse.julialang.org/t/are-there-any-plans-to-support-blis-in-julia/19620/16 "2022-10-28T12:04:13Z")

</div>

Yes, it works 😀

---

<div class="post-metadata">

**Author:** ![carstenbauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/carstenbauer/32/4981_2.png) [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Post date:** [October 28, 2022, 12:05pm UTC](https://discourse.julialang.org/t/are-there-any-plans-to-support-blis-in-julia/19620/17 "2022-10-28T12:05:44Z")

</div>

Just to clarify, which one works? BLISBLAS.jl?

---

<div class="post-metadata">

**Author:** ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)\
**Post date:** [October 28, 2022, 12:12pm UTC](https://discourse.julialang.org/t/are-there-any-plans-to-support-blis-in-julia/19620/18 "2022-10-28T12:12:57Z")

</div>

> **[GitHub - JuliaLinearAlgebra/BLIS.jl: This repo plans to provide a low-level...](https://github.com/JuliaLinearAlgebra/BLIS.jl)**
>
> This repo plans to provide a low-level Julia wrapper for BLIS typed interface. - GitHub - JuliaLinearAlgebra/BLIS.jl: This repo plans to provide a low-level Julia wrapper for BLIS typed interface.

seems to be newer (at least some commits are newer). Is the graph there still current? I.e. is BLIS (or BLISBLAS.jl) much faster for some stuff? Compared to built-in, or better options. There’s also MKL.jl and Julia-only code.

> [@photor](#):
>
> Just tried BLIS.jl on Julia 1.6.\* and 1.7.\*

You should always test on latest (supported) version, which is 1.8.2. That said 1.6 (and I guess 1.7 which is no longer supported though) should also work. Could also try 1.9-DEV…

---

<div class="post-metadata">

**Author:** ![carstenbauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/carstenbauer/32/4981_2.png) [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Post date:** [October 28, 2022, 12:18pm UTC](https://discourse.julialang.org/t/are-there-any-plans-to-support-blis-in-julia/19620/19 "2022-10-28T12:18:07Z")

</div>

> [@Palli](#):
>
> seems to be newer (at least some commits are newer).

Well, the opposite is true: BLISBLAS.jl is younger than BLIS.jl 🙂 Since BLISBLAS.jl uses LBT (similar to MKL.jl) it has [almost no code in it](https://github.com/carstenbauer/BLISBLAS.jl/blob/main/src/BLISBLAS.jl). So why should it have new commits? 🙂

BLIS.jl takes a much more manual approach (it was created/started before LBT was a thing IIRC). Hence, the codebase is much bigger.

> [@Palli](#):
>
> Is the graph there still current? I.e. is BLIS (or BLISBLAS.jl) much faster for some stuff? Compared to built-in, or better options. There’s also MKL.jl and Julia-only code.

Don’t know about the graph but yes, BLIS can be faster than OpenBLAS and Intel MKL, in particular on non-Intel hardware (e.g. AMD). See [GitHub - carstenbauer/julia-dgemm-noctua: DGEMM Benchmarks on Noctua 1/2 at PC2](https://github.com/carstenbauer/julia-dgemm-noctua#noctua-2) for example.

---

<div class="post-metadata">

**Author:** ![photor](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/photor/32/14343_2.png) [@photor](https://discourse.julialang.org/u/photor)\
**Post date:** [October 28, 2022, 12:20pm UTC](https://discourse.julialang.org/t/are-there-any-plans-to-support-blis-in-julia/19620/20 "2022-10-28T12:20:42Z")

</div>

> [@carstenbauer](#):
>
> BLISBLAS.jl

I meant your BLISBLAS.jl 😀  
And now BLIS.jl also works for me after @giordano 's suggestion 🙂

[Next page](https://discourse.julialang.org/t/are-there-any-plans-to-support-blis-in-julia/19620.md?page=2)
