Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/pytorch/cpuinfo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKulin Seth <kulinseth@gmail.com>2022-07-12 23:25:39 +0300
committerGitHub <noreply@github.com>2022-07-12 23:25:39 +0300
commit0c5d43135059ed9386782e12f4499038ca02e2e5 (patch)
treea719169a0c965d23ab1ce9c5ca2d25638f60897c
parent53298db833c5c5a1598639e9b47cc1a602bbac26 (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.c5
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) {