-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Metal fill kernel #1501
base: main
Are you sure you want to change the base?
Metal fill kernel #1501
Conversation
Is there any benefit to using a CPU alloc and simply doing a memcpy ? Do you have benchmarks for it ? Also keep the blit for zeros all the way. Remove the trait follow the rest of the crates convention. |
It's a tiny bit faster, yeah 😉 fill_metal_u8/iter time: [101.33 µs 101.64 µs 101.98 µs]
thrpt: [153.22 GiB/s 153.73 GiB/s 154.20 GiB/s]
change:
time: [-96.183% -96.117% -96.019%] (p = 0.00 < 0.05)
thrpt: [+2411.8% +2475.3% +2520.1%]
fill_metal_f32/iter time: [409.20 µs 437.94 µs 467.82 µs]
thrpt: [133.60 GiB/s 142.71 GiB/s 152.74 GiB/s]
change:
time: [-97.242% -97.113% -96.969%] (p = 0.00 < 0.05)
thrpt: [+3199.1% +3364.0% +3525.2%]
Performance has improved.
That's what I'm doing 👍 |
If we want to be able to encode |
…lakstad/metal-fill
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
49ff588
to
ceaf7f1
Compare
Still uses blit command encoder for zeroes and all u8 values.