Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpu: aarch64: softmax: fall back to ref if stag != dtag #1823

Merged
merged 1 commit into from
Mar 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions src/cpu/aarch64/acl_softmax.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright 2021-2022 Arm Ltd. and affiliates
* Copyright 2021-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 @@ -94,12 +94,13 @@ struct acl_softmax_fwd_t : public primitive_t {
status_t init(engine_t *engine) {

bool ok = is_fwd()
// ACL only supports matching src/dst data types
&& src_md()->data_type == dst_md()->data_type
&& set_default_formats() == status::success
// ACL only supports matching src/dst (this must come after
// set_default_formats() to handle format_kind::any)
&& *src_md() == *dst_md()
&& utils::one_of(
src_md()->data_type, data_type::f32, data_type::f16)
&& attr()->has_default_values()
&& set_default_formats() == status::success;
&& attr()->has_default_values();
if (!ok) return status::unimplemented;

// Get memory desc to find sizes and dims
Expand Down