Skip to content

[matmul code] First non-naive test fails #73

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

Closed
flying-sheep opened this issue Mar 24, 2025 · 8 comments · Fixed by #74
Closed

[matmul code] First non-naive test fails #73

flying-sheep opened this issue Mar 24, 2025 · 8 comments · Fixed by #74

Comments

@flying-sheep
Copy link

Fails for me with

Mismatch at [0, 1]: expected 22839525000, got 22839521000

I’m on Linux with a AMD Radeon RX 6800 XT

@flying-sheep
Copy link
Author

flying-sheep commented Mar 24, 2025

Here’s an ANSI-colored debug.log

@LegNeato
Copy link
Contributor

Thanks! I will hopefully look into it later this week if other people don't get to it

@flying-sheep
Copy link
Author

flying-sheep commented Mar 26, 2025

That would be great!

The example can also be updated to the newest main branch revision, making it able to use a newer Rust nightly and removes the need for this hack, I think:

# This is the default but without explicitly specifying it, Cargo
# will treat the identical settings in `[profile.release.build-override]` below
# as different sets of `rustc` flags and will not reuse artifacts between them.
codegen-units = 256
# Compile build-dependencies in release mode with the same settings as regular
# dependencies (including the incremental enabled above).
#
# We need this to templorarily work around
# https://github.com/Rust-GPU/rust-gpu/issues/29.
[profile.release.build-override]
opt-level = 3
incremental = true
codegen-units = 256

Question: When running the example, it always rebuilds the GPU crates for me. Is there a way to have cargo cache them?

LegNeato added a commit to LegNeato/rust-gpu.github.io that referenced this issue Mar 26, 2025
LegNeato added a commit to LegNeato/rust-gpu.github.io that referenced this issue Mar 26, 2025
Hardcoded one drifts when floats are large.

Fixes Rust-GPU#73.
@LegNeato
Copy link
Contributor

Latest rust-gpu is #75

@LegNeato
Copy link
Contributor

Can you open a bug for the rebuilds? We are emitting cargo metadata so it shouldn't always rebuild but I may have messed something up.

@flying-sheep
Copy link
Author

In Rust-GPU or here?

This is what rebuilds:

   Compiling compiled_isomorphic v0.1.0 (/home/phil/Dev/Rust-GPU matmul kernel/crates/cpu/compiled_for_gpu/isomorphic)
   Compiling compiled_workgroup_2d v0.1.0 (/home/phil/Dev/Rust-GPU matmul kernel/crates/cpu/compiled_for_gpu/workgroup_2d)
   Compiling compiled_tiling_1d_loop v0.1.0 (/home/phil/Dev/Rust-GPU matmul kernel/crates/cpu/compiled_for_gpu/tiling_1d_loop)
   Compiling compiled_tiling_2d v0.1.0 (/home/phil/Dev/Rust-GPU matmul kernel/crates/cpu/compiled_for_gpu/tiling_2d)
   Compiling compiled_workgroup_256 v0.1.0 (/home/phil/Dev/Rust-GPU matmul kernel/crates/cpu/compiled_for_gpu/workgroup_256)
   Compiling compiled_tiling_1d v0.1.0 (/home/phil/Dev/Rust-GPU matmul kernel/crates/cpu/compiled_for_gpu/tiling_1d)
   Compiling compiled_naive v0.1.0 (/home/phil/Dev/Rust-GPU matmul kernel/crates/cpu/compiled_for_gpu/naive)
    Building [======================>  ] 257/273: compiled_tiling_1d(build), compiled_workgroup_256(build), compiled_naive(build), compiled_tiling_1d_loop(build), compiled_isomorphic(build), compiled_tiling_2d(build), compiled_workgroup_2d(build)                                                                                 

@LegNeato
Copy link
Contributor

Here, it shouldn't be rebuilding

@flying-sheep
Copy link
Author

done! #79

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants