Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Environment:
JULIA_NUM_THREADS = 36
```
Resulted in the following:
![octavian10980xebench](https://github.com/JuliaLinearAlgebra/Octavian.jl/tree/master/docs/src/assets/bench10980xe.png)
![octavian10980xebench](https://raw.githubusercontent.com/JuliaLinearAlgebra/Octavian.jl/master/docs/src/assets/bench10980xe.png)

## Related Packages

Expand Down
15 changes: 10 additions & 5 deletions src/init.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,19 @@ function __init__()
end

function init_bcache()
BCACHEPTR[] = VectorizationBase.valloc(second_cache_size() * bcache_count(), Cvoid, ccall(:jl_getpagesize, Int, ()))
if bcache_count() ≢ Zero()
BCACHEPTR[] = VectorizationBase.valloc(second_cache_size() * bcache_count(), Cvoid, ccall(:jl_getpagesize, Int, ()))
end
nothing
end

function init_acache()
Sys.WORD_SIZE ≤ 32 || return
ACACHEPTR[] = VectorizationBase.valloc(first_cache_size() * init_num_tasks(), Cvoid, ccall(:jl_getpagesize, Int, ()))
nothing
if Sys.WORD_SIZE ≤ 32
function init_acache()
ACACHEPTR[] = VectorizationBase.valloc(first_cache_size() * init_num_tasks(), Cvoid, ccall(:jl_getpagesize, Int, ()))
nothing
end
else
init_acache() = nothing
end

function init_num_tasks()
Expand Down
2 changes: 1 addition & 1 deletion src/matmul.jl
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ function __matmul!(
# `nᵣ*nspawn ≥ N` is needed at the moment to avoid accidentally splitting `N` to be `< nᵣ` while packing
# Should probably handle that with a smarter splitting function...
matmulsplitn!(C, A, B, α, β, Mc, M, K, N, nspawn, Val{false}())
elseif ((nspawn*(W+W) > M) || (contiguousstride1(B) ? (roundtostaticint(Kc * Nc * R₂Default()) ≥ K * N) : (firstbytestride(B) ≤ 1600)))
elseif (bcache_count() === Zero()) || ((nspawn*(W+W) > M) || (contiguousstride1(B) ? (roundtostaticint(Kc * Nc * R₂Default()) ≥ K * N) : (firstbytestride(B) ≤ 1600)))
matmulsplitn!(C, A, B, α, β, Mc, M, K, N, nspawn, Val{true}())
else # TODO: Allow splitting along `N` for `matmul_pack_A_and_B!`
matmul_pack_A_and_B!(C, A, B, α, β, M, K, N, nspawn, W₁Default(), W₂Default(), R₁Default(), R₂Default())
Expand Down