Skip to content

Cpusummary 0.1.26 #157

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Dec 13, 2022
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
4 changes: 0 additions & 4 deletions .github/workflows/ci-julia-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ jobs:
matrix:
arch:
- x64
- x86
os:
- ubuntu-latest
- windows-latest
Expand All @@ -29,9 +28,6 @@ jobs:
- '3' # GitHub runners have 2 cores, so `NUM_CORES+1` is 3
version:
- 'nightly'
exclude:
- os: macOS-latest
arch: x86 # 32-bit Julia binaries are not available on macOS
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ jobs:
matrix:
arch:
- x64
- x86
os:
- ubuntu-latest
- windows-latest
Expand All @@ -76,9 +75,6 @@ jobs:
- '3' # GitHub runners have 2 cores, so `NUM_CORES+1` is 3
version:
- '1' # automatically expands to the latest stable 1.x release of Julia
exclude:
- os: macOS-latest
arch: x86 # 32-bit Julia binaries are not available on macOS
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
Expand Down
8 changes: 4 additions & 4 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Octavian"
uuid = "6fd5a793-0b7e-452c-907f-f8bfe9c57db4"
authors = ["Mason Protter", "Chris Elrod", "Dilum Aluthge", "contributors"]
version = "0.3.17"
authors = ["Chris Elrod", "Dilum Aluthge", "Mason Protter", "contributors"]
version = "0.3.18"

[deps]
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
Expand All @@ -17,13 +17,13 @@ VectorizationBase = "3d5dd08c-fd9d-11e8-17fa-ed2836048c2f"

[compat]
ArrayInterface = "3.1.14, 5.0.1, 6"
CPUSummary = "0.1.1 - 0.1.8, 0.1.14 - 0.1.25"
CPUSummary = "0.1.26"
IfElse = "0.1"
LoopVectorization = "0.12.86"
ManualMemory = "0.1.1"
PolyesterWeave = "0.1.1"
Requires = "1"
Static = "0.7.5"
Static = "0.7.5, 0.8"
ThreadingUtilities = "0.5"
VectorizationBase = "0.21.15"
julia = "1.6"
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ matrix multiplication on the CPU, built on top of
Please see the
[Octavian documentation](https://octavian.JuliaLinearAlgebra.org/stable).

Octavian dropped 32bit Julia support. See [PR#157](https://github.com/JuliaLinearAlgebra/Octavian.jl/pull/157). If you're interested in restoring it, please file a PR to fix failing tests.

## Benchmarks

You can run benchmarks using [BLASBenchmarksCPU.jl](https://github.com/JuliaLinearAlgebra/BLASBenchmarksCPU.jl):
Expand Down
12 changes: 6 additions & 6 deletions benchmark/tilesearch.jl
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ end


T = Float64
min_size = round(Int, sqrt(0.65 * Octavian.VectorizationBase.cache_size(Val(3)) / sizeof(T)))
max_size = round(Int, sqrt( 32 * Octavian.VectorizationBase.cache_size(Val(3)) / sizeof(T)))
min_size = round(Int, sqrt((0.65/4) * Octavian.num_cores() * Octavian.VectorizationBase.cache_size(Val(3)) / sizeof(T)))
max_size = round(Int, sqrt( (32/4) * Octavian.num_cores() * Octavian.VectorizationBase.cache_size(Val(3)) / sizeof(T)))

SR = size_range(max_size, min_size, 400);
const CsConst, AsConst, BsConst = matrix_range(SR, T);
Expand Down Expand Up @@ -111,7 +111,7 @@ const CsConst, AsConst, BsConst = matrix_range(SR, T);


function matmul_objective(params)
print("Params: ", params, "; ")
print("Params= ", params, "; ")
W₁, W₂, R₁, R₂ = params
gflop = bench_size(CsConst, AsConst, BsConst, Val{W₁}(), Val{W₂}(), Val{R₁}(), Val{R₂}())
println(gflop)
Expand All @@ -125,12 +125,12 @@ lower = 0.75 .* init;
upper = [0.9, 1.25init[2], 0.999, 0.999];
# init = [0.001, 0.9754033943603924, 0.5711159869399494, 0.7547361860432168];

#=

opt = Optim.optimize(
matmul_objective, init, ParticleSwarm(lower = lower, upper = upper),
Optim.Options(iterations = 10^6, time_limit = 8hours)
Optim.Options(iterations = 10^6, time_limit = 14*hours)
);
=#




2 changes: 1 addition & 1 deletion src/Octavian.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ using VectorizationBase, ArrayInterface, LoopVectorization

using VectorizationBase: align, AbstractStridedPointer, zstridedpointer, vsub_nsw, assume,
static_sizeof, StridedPointer, gesp, pause, pick_vector_width, has_feature
using CPUSummary: cache_size, num_cores, cache_inclusive, cache_linesize
using CPUSummary: cache_size, num_cores, num_threads, cache_inclusive, cache_linesize
using LoopVectorization: preserve_buffer, CloseOpen, UpperBoundedInteger
using ArrayInterface: size, strides, offsets, indices, axes, StrideIndex
using IfElse: ifelse
Expand Down
2 changes: 1 addition & 1 deletion src/global_constants.jl
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ _second_cache_size(scs::StaticInt, ::False) = scs
_second_cache_size(::StaticInt{0}, ::Nothing) = StaticInt(3145728)
function second_cache_size()
sc = second_cache()
_second_cache_size(cache_size(sc), cache_inclusive(sc))
_second_cache_size(cache_size(sc), cache_inclusive(sc)) * min(num_cores(), num_threads())
end

first_cache_size(::Val{T}) where {T} = first_cache_size() ÷ static_sizeof(T)
Expand Down