• Y
    Implement the GPU kernel of fc operator (#19687) · a65c728e
    Yiqun Liu 提交于
    * Refine the codes related to fc op.
    
    * Add GPU implementation for fc functor.
    
    * Apply fc_fuse_pass in GPU inference.
    test=develop
    
    * Change the cmake for fc op.
    
    * Change PADDLE_ENFORCE to PADDLE_ENFORCE_EQ.
    
    * Add an attribute to set the activation type in fc_op.
    
    * Enhance the unittest of fc_op.
    test=develop
    
    * Remove the declaration of FCOpGrad back to the header file.
    test=develop
    
    * Set default value for newly added arguments in test_fc_op.
    test=develop
    未验证
    a65c728e
fc_op.cu.cc 831 字节
/* Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */

#include "paddle/fluid/operators/fc_op.h"

namespace ops = paddle::operators;
REGISTER_OP_CUDA_KERNEL(
    fc, ops::FCOpKernel<paddle::platform::CUDADeviceContext, float>,
    ops::FCOpKernel<paddle::platform::CUDADeviceContext, double>);
反馈
建议
客服 返回
顶部