Skip to content

Commit

Permalink
aarch64: fix jit_brgemm warnings
Browse files Browse the repository at this point in the history
Signed-off-by: yetao01 <[email protected]>
  • Loading branch information
taoye9 authored and vpirogov committed Sep 25, 2024
1 parent 2dbda90 commit 03fc72b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
8 changes: 6 additions & 2 deletions src/cpu/aarch64/brgemm/jit_brgemm_kernel.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*******************************************************************************
* Copyright 2021-2023 Intel Corporation
* Copyright 2024 FUJITSU LIMITED
* Copyright 2024 Arm Ltd. and affiliates
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -1876,15 +1877,18 @@ void jit_brgemm_kernel_t::bdb_loop() {
}

void jit_brgemm_kernel_t::generate() {
size_t simd_w_;
size_t simd_w_ = 0;
switch (brg.isa_impl) {
case sve_512:
simd_w_ = cpu_isa_traits<sve_512>::vlen / sizeof(float);
break;
case sve_256:
simd_w_ = cpu_isa_traits<sve_256>::vlen / sizeof(float);
break;
default: assert(!"unsupported isa");
default: {
assert(!"unsupported isa");
return;
}
}
preamble();
if (simd_w_ != cpu_sveLen / sizeof(float)) {
Expand Down
4 changes: 2 additions & 2 deletions src/cpu/aarch64/jit_brgemm_conv_comp_pad_kernel.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*******************************************************************************
* Copyright 2022-2023 Intel Corporation
* Copyright 2024 FUJITSU LIMITED
* Copyright 2024 Arm Ltd. and affiliates
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -43,8 +44,7 @@ struct jit_uni_brgemm_conv_comp_pad_kernel_t : public jit_generator {

using XReg = const Xbyak_aarch64::XReg;

jit_uni_brgemm_conv_comp_pad_kernel_t<isa>(
const jit_brgemm_conv_conf_t &ajcp);
jit_uni_brgemm_conv_comp_pad_kernel_t(const jit_brgemm_conv_conf_t &ajcp);

~jit_uni_brgemm_conv_comp_pad_kernel_t() = default;

Expand Down
15 changes: 11 additions & 4 deletions src/cpu/aarch64/jit_brgemm_post_ops.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*******************************************************************************
* Copyright 2020-2023 Intel Corporation
* Copyright 2024 FUJITSU LIMITED
* Copyright 2024 Arm Ltd. and affiliates
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -196,15 +197,18 @@ struct jit_brgemm_kernel_diff_bias_t : public jit_generator {
}

void generate() override {
size_t simd_w_;
size_t simd_w_ = 0;
switch (brg_.isa_impl) {
case sve_512:
simd_w_ = cpu_isa_traits<sve_512>::vlen / sizeof(float);
break;
case sve_256:
simd_w_ = cpu_isa_traits<sve_256>::vlen / sizeof(float);
break;
default: assert(!"unsupported isa");
default: {
assert(!"unsupported isa");
return;
}
}
preamble();
if (simd_w_ != cpu_sveLen / sizeof(float)) {
Expand Down Expand Up @@ -850,15 +854,18 @@ struct jit_brgemm_kernel_post_ops : public jit_generator {
}

void generate() override {
size_t simd_w_;
size_t simd_w_ = 0;
switch (brg.isa_impl) {
case sve_512:
simd_w_ = cpu_isa_traits<sve_512>::vlen / sizeof(float);
break;
case sve_256:
simd_w_ = cpu_isa_traits<sve_256>::vlen / sizeof(float);
break;
default: assert(!"unsupported isa");
default: {
assert(!"unsupported isa");
return;
}
}
preamble();
if (simd_w_ != cpu_sveLen / sizeof(float)) {
Expand Down

0 comments on commit 03fc72b

Please sign in to comment.