24 #ifndef ARM_COMPUTE_CPP_VALIDATE_H 25 #define ARM_COMPUTE_CPP_VALIDATE_H 44 #ifndef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC 46 function, file, line,
"This CPU architecture does not support F16 data type, you need v8.2 or above");
64 #if !(defined(__ARM_FEATURE_BF16_VECTOR_ARITHMETIC) || defined(ARM_COMPUTE_FORCE_BF16)) 66 function, file, line,
"This CPU architecture does not support BFloat16 data type, you need v8.6 or above");
105 #define ARM_COMPUTE_ERROR_ON_CPU_F16_UNSUPPORTED(tensor) \ 106 ARM_COMPUTE_ERROR_THROW_ON(::arm_compute::error_on_unsupported_cpu_fp16(__func__, __FILE__, __LINE__, tensor)) 108 #define ARM_COMPUTE_RETURN_ERROR_ON_CPU_F16_UNSUPPORTED(tensor) \ 109 ARM_COMPUTE_RETURN_ON_ERROR(::arm_compute::error_on_unsupported_cpu_fp16(__func__, __FILE__, __LINE__, tensor)) 111 #define ARM_COMPUTE_ERROR_ON_CPU_BF16_UNSUPPORTED(tensor) \ 112 ARM_COMPUTE_ERROR_THROW_ON(::arm_compute::error_on_unsupported_cpu_bf16(__func__, __FILE__, __LINE__, tensor)) 114 #define ARM_COMPUTE_RETURN_ERROR_ON_CPU_BF16_UNSUPPORTED(tensor) \ 115 ARM_COMPUTE_RETURN_ON_ERROR(::arm_compute::error_on_unsupported_cpu_bf16(__func__, __FILE__, __LINE__, tensor)) #define ARM_COMPUTE_RETURN_ERROR_ON_LOC_MSG(cond, func, file, line, msg)
If the condition is true, an error is thrown.
#define ARM_COMPUTE_RETURN_ERROR_ON_LOC(cond, func, file, line)
If the condition is true, an error is returned.
#define ARM_COMPUTE_RETURN_ON_ERROR(status)
Checks if a status contains an error and returns it.
virtual DataType data_type() const =0
Data type used for each element of the tensor.
Store the tensor's metadata.
Interface for Neon tensor.
Copyright (c) 2017-2021 Arm Limited.
1 channel, 1 F16 per channel
16-bit brain floating-point number
Status error_on_unsupported_cpu_bf16(const char *function, const char *file, const int line, const ITensorInfo *tensor_info)
Return an error if the data type of the passed tensor info is BFLOAT16 and BFLOAT16 support is not co...
virtual ITensorInfo * info() const =0
Interface to be implemented by the child class to return the tensor's metadata.
Status error_on_unsupported_cpu_fp16(const char *function, const char *file, const int line, const ITensorInfo *tensor_info)
Return an error if the data type of the passed tensor info is FP16 and FP16 support is not compiled i...