diff options
author | Kulin Seth <kulinseth@gmail.com> | 2022-07-12 23:25:39 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-12 23:25:39 +0300 |
commit | 0c5d43135059ed9386782e12f4499038ca02e2e5 (patch) | |
tree | a719169a0c965d23ab1ce9c5ca2d25638f60897c | |
parent | 53298db833c5c5a1598639e9b47cc1a602bbac26 (diff) |
Add Arm BF16 support for Apple platforms (#104)
Co-authored-by: Developer-Ecosystem-Engineering <65677710+Developer-Ecosystem-Engineering@users.noreply.github.com>
-rw-r--r-- | src/arm/mach/init.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/arm/mach/init.c b/src/arm/mach/init.c index dbea578..ef3aace 100644 --- a/src/arm/mach/init.c +++ b/src/arm/mach/init.c @@ -366,6 +366,11 @@ void cpuinfo_arm_mach_init(void) { cpuinfo_isa.dot = true; } + const uint32_t has_FEAT_BF16 = get_sys_info_by_name("hw.optional.arm.FEAT_BF16"); + if (has_FEAT_BF16 != 0) { + cpuinfo_isa.bf16 = true; + } + uint32_t num_clusters = 1; for (uint32_t i = 0; i < mach_topology.cores; i++) { cores[i] = (struct cpuinfo_core) { |