Skip to content

Conversation

@reyoung
Copy link
Collaborator

@reyoung reyoung commented Jul 16, 2017

  • It is used to create an operator library. It splits CPU and
    GPU sources and links operator common libraries.
  • It also give a reasonable warning and error when operator developer
    not correctly implement an operator.
    • Warning for lack of GPU kernel.
  • Same interface as cc_library to make code style consistent.
* It is used to create an operator library. It handles to split CPU and GPU sources and links operator common libraries. * It also give a reasonable warning and error when operator developer not correctly implement an operator. * Warning for lack of GPU kernel. * Same interface as `cc_library` to make code style consistent.
@reyoung reyoung requested a review from gangliao July 16, 2017 03:17
else()
cc_library(add_op SRCS add_op.cc DEPS operator op_registry glog ddim)
endif()
function(op_library TARGET)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This not in generic.cmake because it is only used by building an operator, not a generic function.

@reyoung reyoung requested review from QiJune and jacquesqiao July 17, 2017 02:40
# for ops.
set(cc_srcs)
set(cu_srcs)
set(op_common_deps operator op_registry glog ddim)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

paddle_memory is also needed for an operator

Copy link
Collaborator Author

@reyoung reyoung Jul 17, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is very useful to make Tensor a library. Then we can propagate dependencies of tensor library. (Like eigen3 in future.)

@reyoung reyoung force-pushed the feature/op_library branch from 35a6e78 to 38310f9 Compare July 17, 2017 06:30
Copy link
Member

@QiJune QiJune left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@reyoung reyoung merged commit a4eaf2d into PaddlePaddle:develop Jul 17, 2017
@reyoung reyoung deleted the feature/op_library branch July 17, 2017 07:33
@reyoung reyoung restored the feature/op_library branch July 18, 2017 06:36
@reyoung reyoung deleted the feature/op_library branch October 28, 2017 22:18
heavengate pushed a commit to heavengate/Paddle that referenced this pull request Aug 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants