1. 16 7月, 2017 2 次提交
    • Q
      change net to operator (#2846) · 45ce1649
      Qiao Longfei 提交于
      * OperatorBase should not store OpDesc because not All op contains an
        OpDesc and not all ops create from OpDesc.
        * Networks do not contain OpDesc and are not created by OpDesc
      * Do not register Network to OpRegistry.
        * The network is directly created by the user in Python. Not from
          registry.
      * Correctly handle the `inputs` and `outputs` of a Network.
        * Add CompleteAddOp() methods
      * Remove `AddOp(OpDesc&)` in net-op. All op are added by OperatorPtr.
      * Rewrite unit test for truly tested what networks do.
      * optimise operator_test
      45ce1649
    • Q
      add ADD_OP_CPU to enable add op with only cpu kernel (#2896) · afa99d9a
      Qiao Longfei 提交于
      * add ADD_OP_CPU to enable add op with only cpu kernel
      afa99d9a
  2. 15 7月, 2017 3 次提交
  3. 14 7月, 2017 18 次提交
    • L
      Follow comments · 03b3d0d8
      liaogang 提交于
      03b3d0d8
    • F
      update PADDLE_ENFORCE message · 57a22db3
      fengjiayi 提交于
      57a22db3
    • F
      update tensor.h · 34beec0f
      fengjiayi 提交于
      34beec0f
    • F
      change int numel_ to size_t numel · 8594d5c3
      fengjiayi 提交于
      8594d5c3
    • F
      fix several compile error · 1f97388a
      fengjiayi 提交于
      1f97388a
    • F
      Refactor Tensor::CopyFrom() · dcfcf687
      fengjiayi 提交于
      1. Add template T which indicates data type to `CopyFrom()`, `Slice()`
      and `ShareData()` functions. This makes `CopyData()` code much clearer.
      
      2. Add `set_dim()`.
      
      3. `product(DDim)` transforms `DDim` to `vector<int>` first and then calculate
      its product. That might be quite slow. For `product(dims_)` is frequently
      used in Tensor, we add a mumber variable `numel_` as a cache of the
      product result.
      TODO: refactor `product()` to make it more efficient.
      
      4. Unable Tensor::operator=
      
      5. Remove the limit of POD type, because `float16` and `int8` are not POD type.
      dcfcf687
    • F
      Refactor `Tensor::CopyFrom()` · a1dc4311
      fengjiayi 提交于
      a1dc4311
    • Y
      Get OpProtos in Python · a76f7ed2
      Yu Yang 提交于
      * PyBind and SWIG of paddle cannot be load in a single Python process,
        lazy import all SWIG library of Paddle. Otherwise, the glog, gflags
        are imported twice in a same Python process.
      * Note that all PyBind11 return C++ std::string as an unicode. For
        protobuf, it is need be cast to `str` before use them.
      * Add unit test for Get `OpProtos`
      a76f7ed2
    • Q
      Optimize ptr (#2851) · 58f3de95
      Qiao Longfei 提交于
      * use OperatorPtr = std::shared_ptr<OperatorBase>;
      * use ScopePtr = std::share_ptr<Scope>;
      58f3de95
    • Y
      Let OpProto support multiple and temporary (#2860) · 2462d0c5
      Yu Yang 提交于
      * Let OpProto support multiple and temporary
      
      * Each input/output of Paddle's Op could be a list. Add multiple mark to
        OpProto. Also add a `input_format`/`output_format` attribute if that
        Op has multiple input or output. The format of that attribute please
        reference the comments in `op_proto.proto`
      * Add temporary mark, because some output of an Op is not used by user
        but used by other op for faster computation. Explicitly mark which
        output is temporary could let future memory/computation optimization.
      * Add generated field to AttrProto.
      
      * Add `AddInputs`/`AddOutputs` function
      
      * It is more readable to invoke `AddInputs` not
        `AddInput(multiple=true)`.
      2462d0c5
    • H
      Remove useless empty pointer check. · 010adb99
      hedaoyuan 提交于
      010adb99
    • L
      update · 033523ea
      liaogang 提交于
      033523ea
    • L
      Fix: alignment metric · ea916c84
      liaogang 提交于
      ea916c84
    • Y
      Init commit · cd5113c1
      Yu Yang 提交于
      cd5113c1
    • L
      Fix condition compile · 21b7915d
      liaogang 提交于
      21b7915d
    • L
      ENH: memory test: check alignment and memory size · ab5fe1e9
      liaogang 提交于
      ab5fe1e9
    • Q
      change op to operators · e5887301
      qiaolongfei 提交于
      e5887301
    • H
      Fix optimizer parameter buffer allocation size. · 11660eab
      Helin Wang 提交于
      The buffer allocation size should be number of bytes, not number of
      floats.
      11660eab
  4. 13 7月, 2017 9 次提交
  5. 12 7月, 2017 8 次提交
    • Q
      test OpKernel (#2820) · be441f7d
      Qiao Longfei 提交于
      Add unit test for OpKernel
      be441f7d
    • Q
      add memory header file · 70d937c5
      qijun 提交于
      70d937c5
    • F
      Add Tensor::CopyFrom and Tensor::mutable_data(Place place) · 69d99d48
      fengjiayi 提交于
      1. Add `Tensor::CopyFrom`. Current version can only support CPU memory
      copy. The support of GPU will be provided later by `paddle::memory`.
      The current implementation of `Tensor::CopyFrom` is a little inefficient:
      Every time `CopyFrom` is called, tensor will re-allocate its memory. However, if
      we try to check and reuse `placeholder_`, we have to provide a template
      parameter for `CopyFrom` to indicate the data type. It seems strange for
      a simple copy function.
      
      2. Add `Tensor::mutable_data(Place place)`, which directly use member
      variable `dims_` as its dim parameter. This interface is required by
      `Op::InferShape`.
      69d99d48
    • Q
      follow comments · be2c1a3b
      qijun 提交于
      be2c1a3b
    • Q
      follow comments · a07deac9
      qijun 提交于
      a07deac9
    • Q
      follow comments · 85806e75
      qijun 提交于
      85806e75
    • Q
      fix gpu build error · 8ee50a35
      qijun 提交于
      8ee50a35
    • L
      fix pybind compile question · e0ea87c9
      Luo Tao 提交于
      e0ea87c9