Skip to content
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

request 8-byte buffer alignment on macos #80

Merged
merged 2 commits into from
Sep 20, 2023
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
5 changes: 1 addition & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,7 @@ jobs:
- rust: stable
target: aarch64-unknown-linux-gnu
features: constconf cgemm threading
- rust: 1.61.0
target: aarch64-unknown-linux-gnu
features: cgemm
- rust: 1.41.1 # MSRV
- rust: 1.65.0
target: aarch64-unknown-linux-gnu
features: cgemm

Expand Down
5 changes: 3 additions & 2 deletions src/gemm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,9 +342,10 @@ const MASK_BUF_SIZE: usize = KERNEL_MAX_SIZE + KERNEL_MAX_ALIGN - 1;

// Pointers into buffer will be manually aligned anyway, due to
// bugs we have seen on certain platforms (macos) that look like
// we don't get more than 16-aligned allocations out of TLS
// we don't get aligned allocations out of TLS - 16- and 8-byte
// allocations have been seen, make the minimal align request we can.
#[cfg_attr(not(target_os = "macos"), repr(align(32)))]
#[cfg_attr(target_os = "macos", repr(align(16)))]
#[cfg_attr(target_os = "macos", repr(align(8)))]
struct MaskBuffer {
buffer: [u8; MASK_BUF_SIZE],
}
Expand Down
Loading