We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Linux x86_64
commit id 94e1212 tag 2.7.1
source/backend/cpu/CPURaster.cpp, line 973左右 此处代码,根据outputType.code的不同,选择使用MNNSelectBinaryFunctionForFloat或者selectForInt进行计算函数的选择 但是实际上,如果某个binary算子,2个输入tensor是float类型,输出tensor是int类型,那么真正应该选择的函数是float类型的计算函数而非int类型的计算函数。 举例,对BinaryOpOperation_GREATER_EQUAL类型的op,int/float算子分别为
return execute<int32_t, int32_t, BinaryGreaterEqual<int32_t, int32_t, int32_t>>;
和
return execute<float, int32_t, BinaryGreaterEqual<float, float, int32_t>>;
source/backend/cpu/CPURaster.cpp, line 973左右的逻辑,从判断outputType选择不同的计算函数,改为判断inputType选择不同的计算函数。
The text was updated successfully, but these errors were encountered:
2.8.1 已经按建议修改
Sorry, something went wrong.
No branches or pull requests
Platform(Include target platform as well if cross-compiling):
Linux x86_64
Github Version:
commit id 94e1212
tag 2.7.1
问题描述
source/backend/cpu/CPURaster.cpp, line 973左右
此处代码,根据outputType.code的不同,选择使用MNNSelectBinaryFunctionForFloat或者selectForInt进行计算函数的选择
但是实际上,如果某个binary算子,2个输入tensor是float类型,输出tensor是int类型,那么真正应该选择的函数是float类型的计算函数而非int类型的计算函数。
举例,对BinaryOpOperation_GREATER_EQUAL类型的op,int/float算子分别为
和
建议
source/backend/cpu/CPURaster.cpp, line 973左右的逻辑,从判断outputType选择不同的计算函数,改为判断inputType选择不同的计算函数。
The text was updated successfully, but these errors were encountered: