# \#blas

**URL:** https://discourse.julialang.org/tag/blas/61.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [What is the current state of multi-threaded BLAS in Julia?](https://discourse.julialang.org/t/what-is-the-current-state-of-multi-threaded-blas-in-julia/111945)

<div class="topic-metadata">

**Author:** [@leestrobel](https://discourse.julialang.org/u/leestrobel)\
**Replies:** 9\
**Last updated:** [August 15, 2026, 6:36am UTC](https://discourse.julialang.org/t/what-is-the-current-state-of-multi-threaded-blas-in-julia/111945 "2026-08-15T06:36:51Z")

</div>

Hi, I am wondering what is the current state of multi-threaded BLAS in Julia? I remember looking into several options about a year ago for accelerating dense matrix multiplication and sparse solving on some PDE code I w…

---

## [AOCL.jl v5.3.1](https://discourse.julialang.org/t/aocl-jl-v5-3-1/138718)

<div class="topic-metadata">

**Author:** [@agodbole](https://discourse.julialang.org/u/agodbole)\
**Replies:** 8\
**Last updated:** [August 14, 2026, 5:48am UTC](https://discourse.julialang.org/t/aocl-jl-v5-3-1/138718 "2026-08-14T05:48:05Z")

</div>

Hello all, AOCL is a set of numerical libraries optimized for AMD processors built on the AMD “Zen” architecture, spanning multiple generations. It supports AMD EPYC™, AMD Ryzen™, and AMD Ryzen™ Threadripper™ processor …

---

## [AOCL (not MKL) acceleration on AMD Ryzen CPU's](https://discourse.julialang.org/t/aocl-not-mkl-acceleration-on-amd-ryzen-cpus/112890)

<div class="topic-metadata">

**Author:** [@aasdelat](https://discourse.julialang.org/u/aasdelat)\
**Replies:** 28\
**Last updated:** [August 10, 2026, 10:54am UTC](https://discourse.julialang.org/t/aocl-not-mkl-acceleration-on-amd-ryzen-cpus/112890 "2026-08-10T10:54:52Z")

</div>

Hi: I am interested in calling a lapack routine, dgesvd, that makes a singular value decomposition of a matrix. The library LinearAlgebra.jl already does it, but it is a generic library that does not take full advantag…

---

## [BLAS multithreading on 8 core Apple M2](https://discourse.julialang.org/t/blas-multithreading-on-8-core-apple-m2/135587)

<div class="topic-metadata">

**Author:** [@sparrowhawk](https://discourse.julialang.org/u/sparrowhawk)\
**Replies:** 2\
**Last updated:** [February 12, 2026, 3:54am UTC](https://discourse.julialang.org/t/blas-multithreading-on-8-core-apple-m2/135587 "2026-02-12T03:54:08Z")

</div>

This seems to suggest that there is no improvement with using more threads with BLAS on my 8 core Apple M2 late 2023 model. \*\*julia\>\*\* using AppleAccelerate \*\*julia\>\*\* using LinearAlgebra \*\*julia\>\*\* BLAS.get\_config() Li…

---

## [Relation between BLAS.get\_num\_threads() and SLURM\_CPUS\_PER\_TASK](https://discourse.julialang.org/t/relation-between-blas-get-num-threads-and-slurm-cpus-per-task/134199)

<div class="topic-metadata">

**Author:** [@mancolric](https://discourse.julialang.org/u/mancolric)\
**Replies:** 2\
**Last updated:** [November 29, 2025, 11:58am UTC](https://discourse.julialang.org/t/relation-between-blas-get-num-threads-and-slurm-cpus-per-task/134199 "2025-11-29T11:58:36Z")

</div>

I am running the script MWE.jl using LinearAlgebra display(BLAS.get\_num\_threads()) via SLURM command srun --nodes=1 --ntasks-per-node=1 --cpus-per-task=6 --mem=1G julia MWE.jl As far as I know, for SLURM the CPUs ar…

---

## [Batched Matrix Multiply](https://discourse.julialang.org/t/batched-matrix-multiply/42332)

<div class="topic-metadata">

**Author:** [@bmit](https://discourse.julialang.org/u/bmit)\
**Replies:** 12\
**Last updated:** [October 30, 2025, 8:22am UTC](https://discourse.julialang.org/t/batched-matrix-multiply/42332 "2025-10-30T08:22:15Z")

</div>

I’d like to be able to be able to broadcast matrix multiplication across multidimensional arrays similar to the following: a = rand(4,3,2) b = rand(3,4,2) a .\* b # expect a (4,4,2) array, but instead errors I underst…

---

## [How to call blas getrf, getri properly ? i want to create a benchmark inverse matrix using gauss, crout, native julia inv(A) and BLAS direct](https://discourse.julialang.org/t/how-to-call-blas-getrf-getri-properly-i-want-to-create-a-benchmark-inverse-matrix-using-gauss-crout-native-julia-inv-a-and-blas-direct/128771)

<div class="topic-metadata">

**Author:** [@Roberto\_Bagyo](https://discourse.julialang.org/u/Roberto_Bagyo)\
**Replies:** 5\
**Last updated:** [May 7, 2025, 5:38pm UTC](https://discourse.julialang.org/t/how-to-call-blas-getrf-getri-properly-i-want-to-create-a-benchmark-inverse-matrix-using-gauss-crout-native-julia-inv-a-and-blas-direct/128771 "2025-05-07T17:38:06Z")

</div>

hello, i am new here. fortran based but just for fun actually. i tried to convert test\_fpu.f90 from polyhedron benchmark inverse matrix. i heard julia is multihreading and easier to code, then dgemm performance is highe…

---

## [Bitten by BLAS threading. Again. (Interaction w/ MPI.)](https://discourse.julialang.org/t/bitten-by-blas-threading-again-interaction-w-mpi/118533)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 2\
**Last updated:** [August 24, 2024, 2:19pm UTC](https://discourse.julialang.org/t/bitten-by-blas-threading-again-interaction-w-mpi/118533 "2024-08-24T14:19:10Z")

</div>

I ran some MPI codes. On a Mac 2 Ultra (16 performance cores), and on a Grace+Grace system (two sockets, 72 cores each). The runs were carried out with 4 processes on a single machine (node). There was a weird mismatch …

---

## [Fastest way to perform A \* B \* A’](https://discourse.julialang.org/t/fastest-way-to-perform-a-b-a/117386)

<div class="topic-metadata">

**Author:** [@eveningsilverfox](https://discourse.julialang.org/u/eveningsilverfox)\
**Replies:** 9\
**Last updated:** [August 13, 2024, 12:30pm UTC](https://discourse.julialang.org/t/fastest-way-to-perform-a-b-a/117386 "2024-08-13T12:30:08Z")

</div>

Given two dense square matrices with ComplexF64 elements of size approximately 100000X100000, A and B, what is the fastest way to perform R=ABA’, where A’=conj(tr(A)) is the Hermitian conjugate of A?. If it helps: (1) …

---

## [Fastest way to perform A\[a,:\] \* B \* A’\[:,b\] where a and b are vectors of indices](https://discourse.julialang.org/t/fastest-way-to-perform-a-a-b-a-b-where-a-and-b-are-vectors-of-indices/117958)

<div class="topic-metadata">

**Author:** [@eveningsilverfox](https://discourse.julialang.org/u/eveningsilverfox)\
**Replies:** 5\
**Last updated:** [August 8, 2024, 8:37pm UTC](https://discourse.julialang.org/t/fastest-way-to-perform-a-a-b-a-b-where-a-and-b-are-vectors-of-indices/117958 "2024-08-08T20:37:31Z")

</div>

This question is a follow-up to To recap, given two dense square matrices with ComplexF64 elements of size approximately 100000X100000, A and B, what is the fastest way to perform R=ABA’, where A’=conj(tr(A)) is the He…

---

## [Memory Allocation when using mul! with sparse arrays and views](https://discourse.julialang.org/t/memory-allocation-when-using-mul-with-sparse-arrays-and-views/111276)

<div class="topic-metadata">

**Author:** [@leespen1](https://discourse.julialang.org/u/leespen1)\
**Replies:** 4\
**Last updated:** [July 8, 2024, 6:30pm UTC](https://discourse.julialang.org/t/memory-allocation-when-using-mul-with-sparse-arrays-and-views/111276 "2024-07-08T18:30:07Z")

</div>

I am writing code which performs a five argument mul! operation (from LinearAlgebra) inside a for loop where performance is critical. When using a sparse array instead of a matrix, the operation allocates memory: julia\>…

---

## [Question about Setting BLAS Threads on Cluster](https://discourse.julialang.org/t/question-about-setting-blas-threads-on-cluster/108852)

<div class="topic-metadata">

**Author:** [@TI36XPro](https://discourse.julialang.org/u/TI36XPro)\
**Replies:** 0\
**Last updated:** [January 16, 2024, 4:42am UTC](https://discourse.julialang.org/t/question-about-setting-blas-threads-on-cluster/108852 "2024-01-16T04:42:37Z")

</div>

Hello, I have a question about how BLAS threads are specified. For context, I am on my University’s HPC in an interactive session on our shared memory cluster. The partition that I am using has nodes which consist of tw…

---

## [Inplace axpy! but storing to a third arguement rather than y](https://discourse.julialang.org/t/inplace-axpy-but-storing-to-a-third-arguement-rather-than-y/107188)

<div class="topic-metadata">

**Author:** [@albertomercurio](https://discourse.julialang.org/u/albertomercurio)\
**Replies:** 4\
**Last updated:** [December 6, 2023, 10:49am UTC](https://discourse.julialang.org/t/inplace-axpy-but-storing-to-a-third-arguement-rather-than-y/107188 "2023-12-06T10:49:32Z")

</div>

Hello, from the BLAS package, I know that axpy!(a,X,Y) computes Y += a X, where a is a scalar and X and Y are a matrix or a vector. Now I want instead something like Z = a X + Y So, something like axpyz!(a,X,Y,Z). I…

---

## [Performance issue with multithreaded computation with matrix operations at its heart (Threads.@threads vs. BLAS threads)](https://discourse.julialang.org/t/performance-issue-with-multithreaded-computation-with-matrix-operations-at-its-heart-threads-threads-vs-blas-threads/106043)

<div class="topic-metadata">

**Author:** [@HanD](https://discourse.julialang.org/u/HanD)\
**Replies:** 7\
**Last updated:** [November 13, 2023, 5:00pm UTC](https://discourse.julialang.org/t/performance-issue-with-multithreaded-computation-with-matrix-operations-at-its-heart-threads-threads-vs-blas-threads/106043 "2023-11-13T17:00:05Z")

</div>

While trying to speed up a long computation with chunking more threads on it, I ran into an interesting problem. I found several related threads here, but I couldn’t find a convincing answer, nor a solution to my issue. …

---

## [Multiple BLISBLAS Threads on Workers](https://discourse.julialang.org/t/multiple-blisblas-threads-on-workers/97269)

<div class="topic-metadata">

**Author:** [@andrew-saydjari](https://discourse.julialang.org/u/andrew-saydjari)\
**Replies:** 3\
**Last updated:** [April 10, 2023, 12:47am UTC](https://discourse.julialang.org/t/multiple-blisblas-threads-on-workers/97269 "2023-04-10T00:47:04Z")

</div>

I am refining a BLAS intensive pipeline and have loved (and gotten a nice speedup from) BLISBLAS.jl. I happen to be running on a cluster with hyperthreading. Currently, I am running using addprocs(SlurmClusterManager()) …

---

## [Batched Matrix solve in CUDA.jl](https://discourse.julialang.org/t/batched-matrix-solve-in-cuda-jl/52855)

<div class="topic-metadata">

**Author:** [@jpdoane](https://discourse.julialang.org/u/jpdoane)\
**Replies:** 3\
**Last updated:** [February 1, 2023, 7:00pm UTC](https://discourse.julialang.org/t/batched-matrix-solve-in-cuda-jl/52855 "2023-02-01T19:00:38Z")

</div>

Is there a way to perform batched matrix inversion/ldiv in CUDA.jl, ie: Yi = Ri \\ Xi where Ri is NxN, and Yi and Xi are NxM, with N and M small (~12). I need to solve a large number of these systems, e.g. 1 \< i \< 50k.…

---

## [What's the difference between LinearAlgebra.axpy! and BLAS.axpy!, and which one should packages extend?](https://discourse.julialang.org/t/whats-the-difference-between-linearalgebra-axpy-and-blas-axpy-and-which-one-should-packages-extend/91585)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 0\
**Last updated:** [December 13, 2022, 5:15am UTC](https://discourse.julialang.org/t/whats-the-difference-between-linearalgebra-axpy-and-blas-axpy-and-which-one-should-packages-extend/91585 "2022-12-13T05:15:08Z")

</div>

BLAS sounds too low level, so intuitively I would think it’s LinearAlgebra.axpy! that packages should extend. However, what is the intended difference between the two? And when should one use one over the other? julia\> …

---

## [Multithreaded LAPACK function in a Threads.@threads loop](https://discourse.julialang.org/t/multithreaded-lapack-function-in-a-threads-threads-loop/45205)

<div class="topic-metadata">

**Author:** [@migarstka](https://discourse.julialang.org/u/migarstka)\
**Replies:** 2\
**Last updated:** [September 24, 2022, 6:42am UTC](https://discourse.julialang.org/t/multithreaded-lapack-function-in-a-threads-threads-loop/45205 "2022-09-24T06:42:31Z")

</div>

Hi everyone, Problem I am trying to understand how to optimally set the number of BLAS threads when I am using a multithreaded LAPACK function in a Threads.@threads loop. More specifically I want to compute the eigende…

---

## [Sparse syrk() routine using Transducers.jl](https://discourse.julialang.org/t/sparse-syrk-routine-using-transducers-jl/86218)

<div class="topic-metadata">

**Author:** [@josuagrw](https://discourse.julialang.org/u/josuagrw)\
**Replies:** 0\
**Last updated:** [August 23, 2022, 7:09pm UTC](https://discourse.julialang.org/t/sparse-syrk-routine-using-transducers-jl/86218 "2022-08-23T19:09:07Z")

</div>

Hi, I implemented a sparse syrk routine to see if I could get something faster than the naive implementation: using SparseArrays using LinearAlgebra using Transducers using Combinatorics naive\_spsyrk(s) = Symmetric(s …

---

## [OpenBLAS much slower on Windows than Linux](https://discourse.julialang.org/t/openblas-much-slower-on-windows-than-linux/84562)

<div class="topic-metadata">

**Author:** [@PeterSimon](https://discourse.julialang.org/u/PeterSimon)\
**Replies:** 4\
**Last updated:** [July 23, 2022, 1:09am UTC](https://discourse.julialang.org/t/openblas-much-slower-on-windows-than-linux/84562 "2022-07-23T01:09:21Z")

</div>

This is a continuation of a discussion in issues 159 and 166 of LinearSolve.jl. I have two computers with similar, 8-core i7-9700 CPUs, one of which runs Windows and the other Manjaro Linux. I ran the benchmark script …

---

## [BLAS performance testing for Julia 1.8](https://discourse.julialang.org/t/blas-performance-testing-for-julia-1-8/69520)

<div class="topic-metadata">

**Author:** [@viralbshah](https://discourse.julialang.org/u/viralbshah)\
**Replies:** 30\
**Last updated:** [July 19, 2022, 7:30am UTC](https://discourse.julialang.org/t/blas-performance-testing-for-julia-1-8/69520 "2022-07-19T07:30:38Z")

</div>

OpenBLAS had two threading related defaults that we used to set until recently, both of which are now relaxed, since openblas has improved on both these fronts: We used to build openblas with 32 max threads (at some po…

---

## [Ideal number of BLAS threads](https://discourse.julialang.org/t/ideal-number-of-blas-threads/79197)

<div class="topic-metadata">

**Author:** [@fipelle](https://discourse.julialang.org/u/fipelle)\
**Replies:** 10\
**Last updated:** [April 27, 2022, 2:43pm UTC](https://discourse.julialang.org/t/ideal-number-of-blas-threads/79197 "2022-04-27T14:43:22Z")

</div>

Hi, I am planning to run a heavy series of matrix operations on a cluster and I was wondering what’s the ideal number of BLAS threads I should use. Assume that I have a machine with 20 cores and 8-16 GB of RAM per core.…

---

## [Multi-threaded inverse of a matrix](https://discourse.julialang.org/t/multi-threaded-inverse-of-a-matrix/79543)

<div class="topic-metadata">

**Author:** [@fipelle](https://discourse.julialang.org/u/fipelle)\
**Replies:** 6\
**Last updated:** [April 16, 2022, 6:07am UTC](https://discourse.julialang.org/t/multi-threaded-inverse-of-a-matrix/79543 "2022-04-16T06:07:57Z")

</div>

Hi there, I thought that BLAS.set\_num\_threads(n) was enough to run all LinearAlgebra functions in a multi-threaded fashion. However, I came to realise that this actually applies mostly to matrix products. Inverses see…

---

## [Regarding the multithreaded performance of OpenBLAS](https://discourse.julialang.org/t/regarding-the-multithreaded-performance-of-openblas/75450)

<div class="topic-metadata">

**Author:** [@ash](https://discourse.julialang.org/u/ash)\
**Replies:** 7\
**Last updated:** [January 31, 2022, 6:33am UTC](https://discourse.julialang.org/t/regarding-the-multithreaded-performance-of-openblas/75450 "2022-01-31T06:33:25Z")

</div>

I have been benchmarking some code and coming across all sorts of questions (see my other thread for in-depth details, I will post a progress update soon). However, I have an OpenBLAS question that I believe merits its …

---

## [Ccall Fortran OpenBLAS multithreading issues with Julia 1.7](https://discourse.julialang.org/t/ccall-fortran-openblas-multithreading-issues-with-julia-1-7/72913)

<div class="topic-metadata">

**Author:** [@Perrin\_Meyer](https://discourse.julialang.org/u/Perrin_Meyer)\
**Replies:** 7\
**Last updated:** [December 14, 2021, 4:06pm UTC](https://discourse.julialang.org/t/ccall-fortran-openblas-multithreading-issues-with-julia-1-7/72913 "2021-12-14T16:06:28Z")

</div>

I am using Julia to drive a Fortran based Boundary Element code. The Fortran code uses OpenMP and OpenBLAS for multithreading. When I call into the BEM code from Julia 1.7, I now only get single-threaded performance. O…

---

## [Convert a Current Installation of Julia to Use \`BlasInt = \`Int32\`](https://discourse.julialang.org/t/convert-a-current-installation-of-julia-to-use-blasint-int32/67915)

<div class="topic-metadata">

**Author:** [@RoyiAvital](https://discourse.julialang.org/u/RoyiAvital)\
**Replies:** 0\
**Last updated:** [September 9, 2021, 7:58am UTC](https://discourse.julialang.org/t/convert-a-current-installation-of-julia-to-use-blasint-int32/67915 "2021-09-09T07:58:51Z")

</div>

Looking at my Julia installation (Using JuliaWin version Juliawin v1.6.2-0 on 2021-07-22) I can see that LinearAlgebra.BlasInt = Int64. This means that any index to array takes 64 Bit. I was wondering, can I make it In…

---

## [Environment variable for BLAS.set\_num\_threads default?](https://discourse.julialang.org/t/environment-variable-for-blas-set-num-threads-default/67594)

<div class="topic-metadata">

**Author:** [@goerz](https://discourse.julialang.org/u/goerz)\
**Replies:** 1\
**Last updated:** [September 2, 2021, 6:54pm UTC](https://discourse.julialang.org/t/environment-variable-for-blas-set-num-threads-default/67594 "2021-09-02T18:54:36Z")

</div>

Is there an environment variable that I can set in my .bashrc so I don’t have to manually prevent multiple BLAS threads (BLAS.set\_num\_threads(1)) in every program? I never, ever want BLAS to run in multithreaded mode. I…

---

## [Product of two symmetric matrices: LoopVectorization.jl vs LinearAlgebra](https://discourse.julialang.org/t/product-of-two-symmetric-matrices-loopvectorization-jl-vs-linearalgebra/67396)

<div class="topic-metadata">

**Author:** [@fipelle](https://discourse.julialang.org/u/fipelle)\
**Replies:** 9\
**Last updated:** [August 31, 2021, 8:11pm UTC](https://discourse.julialang.org/t/product-of-two-symmetric-matrices-loopvectorization-jl-vs-linearalgebra/67396 "2021-08-31T20:11:59Z")

</div>

Hi, I am playing around with LoopVectorization.jl. In doing so, I have noticed that it seems to be about 1.5x faster than LinearAlgebra in computing the product between two symmetric matrices (while being about as fast …

---

## [Uniform scaling inplace addition with matrix](https://discourse.julialang.org/t/uniform-scaling-inplace-addition-with-matrix/59928)

<div class="topic-metadata">

**Author:** [@jarl](https://discourse.julialang.org/u/jarl)\
**Replies:** 13\
**Last updated:** [May 7, 2021, 1:01pm UTC](https://discourse.julialang.org/t/uniform-scaling-inplace-addition-with-matrix/59928 "2021-05-07T13:01:41Z")

</div>

I want to do an inplace add of a multiple of the identity to a matrix. I can get the efficiency I want with a view of the diagonal: using LinearAlgebra function f1!(A,s) D = view(A, diagind(A, 0)) D .+= s; end ju…

---

## [LinearAlgebra.BLAS does not accept non-dense Julia Matrix type?](https://discourse.julialang.org/t/linearalgebra-blas-does-not-accept-non-dense-julia-matrix-type/59921)

<div class="topic-metadata">

**Author:** [@JianghuiDu](https://discourse.julialang.org/u/JianghuiDu)\
**Replies:** 3\
**Last updated:** [April 24, 2021, 6:55pm UTC](https://discourse.julialang.org/t/linearalgebra-blas-does-not-accept-non-dense-julia-matrix-type/59921 "2021-04-24T18:55:37Z")

</div>

LinearAlgebra.BLAS.gbmv!('N', 100, 1, 1, 1.0, A\_POC, ones(100), 0.0, ones(100)) throws error julia\> LinearAlgebra.BLAS.gbmv!('N', 100, 1, 1, 1.0, (A\_POC), ones(100), 0.0, on es(100)) ERROR: LoadError: MethodError: no m…

[Next page](https://discourse.julialang.org/tag/blas/61.md?match_all_tags=true&page=1&tags%5B%5D=blas)
