- 15 7月, 2017 4 次提交
-
-
由 Yu Yang 提交于
All OpCreation method are generated by `create_op_creation_methods::__bootstrap__` method, and stores in `op_creations` object and its methods. There are three parts to implement this feature. 1. Get all registered `OpProto` from C++ side. It is implemented in `get_all_op_protos` method. 1. Create a function to convert `kwargs` to `OpDesc` base on each op's `OpProto`. The `OpDescCreationMethod` class. 1. Convert `OpProto` to `docstring` by `get_docstring_from_op_proto` method. All three methods are unit tested. The `__bootstrap__` just combines them together and create a method in runtime. For details, please reference the doc string in `create_op_creation_methods.py` and the unit test `test_op_creation_methods.py`.
-
由 liaogang 提交于
-
由 liaogang 提交于
-
由 liaogang 提交于
-
- 14 7月, 2017 18 次提交
-
-
由 liaogang 提交于
-
由 fengjiayi 提交于
-
由 fengjiayi 提交于
-
由 fengjiayi 提交于
-
由 fengjiayi 提交于
-
由 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.
-
由 fengjiayi 提交于
-
由 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`
-
由 Qiao Longfei 提交于
* use OperatorPtr = std::shared_ptr<OperatorBase>; * use ScopePtr = std::share_ptr<Scope>;
-
由 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)`.
-
由 hedaoyuan 提交于
-
由 liaogang 提交于
-
由 liaogang 提交于
-
由 Yu Yang 提交于
-
由 liaogang 提交于
-
由 liaogang 提交于
-
由 qiaolongfei 提交于
-
由 Helin Wang 提交于
The buffer allocation size should be number of bytes, not number of floats.
-
- 13 7月, 2017 9 次提交
-
-
由 Liu Yiqun 提交于
-
由 Yu Yang 提交于
* Convert `op` --> `operators` * Remove AddType in OpProtoMaker, because type is part of registry. * Rename CPU_OR_GPU --> DEVICE_TYPE in registry macro.
-
由 liaogang 提交于
-
由 Yu Yang 提交于
* Refine register methods, make Op can get rid of whole-archieve * `USE_OP` before a op is used. * Add unittest for add_op.
-
由 Liu Yiqun 提交于
-
由 Qiao Longfei 提交于
-
由 liaogang 提交于
-
由 qijun 提交于
-
由 Helin Wang 提交于
-
- 12 7月, 2017 9 次提交
-
-
由 Qiao Longfei 提交于
Add unit test for OpKernel
-
由 qijun 提交于
-
由 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`.
-
由 qijun 提交于
-
由 qijun 提交于
-
由 qijun 提交于
-
由 qijun 提交于
-
由 Luo Tao 提交于
-
由 qijun 提交于
-