mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/70858
ghstack-source-id: 147642533
Test Plan: Extracted a constant to a new header, trusting CI build to validate.
Reviewed By: malfet
Differential Revision: D33329689
fbshipit-source-id: 8697bb81a5cc3366462ebdf1f214b62d478fa77c
(cherry picked from commit 16663847e1)
18 lines
331 B
C++
18 lines
331 B
C++
#pragma once
|
|
|
|
#include <cstddef>
|
|
|
|
namespace c10 {
|
|
|
|
#ifdef C10_MOBILE
|
|
// Use 16-byte alignment on mobile
|
|
// - ARM NEON AArch32 and AArch64
|
|
// - x86[-64] < AVX
|
|
constexpr size_t gAlignment = 16;
|
|
#else
|
|
// Use 64-byte alignment should be enough for computation up to AVX512.
|
|
constexpr size_t gAlignment = 64;
|
|
#endif
|
|
|
|
} // namespace c10
|