未验证 提交 63505282 编写于 作者: L Leo Chen 提交者: GitHub

[NPU] support fp16 for npu accuracy op (#31797)

上级 c594f576
...@@ -9,7 +9,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ...@@ -9,7 +9,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#ifdef PADDLE_WITH_ASCEND_CL
#include <memory> #include <memory>
#include <string> #include <string>
...@@ -119,6 +118,7 @@ namespace ops = paddle::operators; ...@@ -119,6 +118,7 @@ namespace ops = paddle::operators;
REGISTER_OP_NPU_KERNEL( REGISTER_OP_NPU_KERNEL(
accuracy, ops::AccuracyNPUKernel<paddle::platform::NPUDeviceContext, float>, accuracy, ops::AccuracyNPUKernel<paddle::platform::NPUDeviceContext, float>,
ops::AccuracyNPUKernel<paddle::platform::NPUDeviceContext,
paddle::platform::float16>,
ops::AccuracyNPUKernel<paddle::platform::NPUDeviceContext, int>, ops::AccuracyNPUKernel<paddle::platform::NPUDeviceContext, int>,
ops::AccuracyNPUKernel<paddle::platform::NPUDeviceContext, int64_t>); ops::AccuracyNPUKernel<paddle::platform::NPUDeviceContext, int64_t>);
#endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册