[go: up one dir, main page]

Skip to content

Commit

Permalink
Fix bazel-linux-aarch64-gcc13 workflow and resolve accompanying bui…
Browse files Browse the repository at this point in the history
…ld errors.

Note that task names should not be prefixes of another task since this messes up retrieving the correct cache for each task.

PiperOrigin-RevId: 700075031
  • Loading branch information
xnnpack-bot committed Nov 25, 2024
1 parent 98f1c8e commit 5f23827
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ jobs:
with:
path: "/home/runner/.cache/bazel"
key: ${{ github.job }}-${{ github.sha }}
bazel-linux-aarch64:
bazel-linux-aarch64-clang18:
runs-on: arm-ubuntu-arm-22.04-4core
timeout-minutes: 60
steps:
Expand Down Expand Up @@ -474,11 +474,13 @@ jobs:
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: Update apt
run: sudo apt update
- name: Install gcc-13
# Pull in gcc-13 from the ubuntu-23.10 repository since it is not available
# for ubuntu-22.04.
working-directory: ${{ github.workspace }}
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install gcc-13 g++-13
- name: Restore bazel cache
uses: actions/cache/restore@v4
Expand Down
15 changes: 11 additions & 4 deletions src/reference/unary-elementwise.cc
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,22 @@ struct ConvertOp {
TOut operator()(TIn x) const {
if (std::is_integral<TOut>::value && !std::is_integral<TIn>::value) {
return round_float_to_int<TOut>(x);
} else if (std::is_integral<TOut>::value && std::is_integral<TIn>::value) {
return static_cast<TOut>(x);
} else {
// Cast to intermediate float to work around issue #7489
return static_cast<TOut>(static_cast<float>(x));
return static_cast<TOut>(x);
}
}
};

#ifdef XNN_HAVE_FLOAT16
template <>
struct ConvertOp<xnn_bfloat16, _Float16> {
explicit ConvertOp(const xnn_unary_uparams*) {}
_Float16 operator()(xnn_bfloat16 x) const {
return static_cast<_Float16>(static_cast<float>(x));
}
};
#endif

template <typename TIn, typename TOut>
const xnn_unary_elementwise_config* get_convert_config(
xnnpack::quantized<TIn>, xnnpack::quantized<TOut>) {
Expand Down
2 changes: 1 addition & 1 deletion src/xnnpack/simd/s16-neon.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ static XNN_INLINE void xnn_store_tail_s16(int16_t* output, xnn_simd_s16_t v,
v_low = vget_high_s16(v);
}
if (num_elements & 2) {
vst1_lane_s32((void*) output, vreinterpret_s32_s16(v_low), 0);
vst1_lane_s32((int32_t*) output, vreinterpret_s32_s16(v_low), 0);
output += 2;
v_low = vext_s16(v_low, v_low, 2);
}
Expand Down

0 comments on commit 5f23827

Please sign in to comment.