fix numpy_code_op document

This commit is contained in:
Gword 2020-07-15 13:45:11 +08:00
parent 5fe6ab58bf
commit 787addcfed
1 changed files with 6 additions and 25 deletions

View File

@ -20,38 +20,19 @@ struct NumpyCodeOp : Op {
NumpyResult _results;
/**
Code Operator for easily customized op.
Numpy Code Operator for easily customized op.
----------------
* [in] shape: the output shape, a integer array
* [in] shape: the output shape, a integer array
* [in] dtype: the output data type
* [in] dtype: the output data type
* [in] inputs: A list of input jittor Vars
* [in] cpu_src: cpu source code string, buildin value:
* [in] inputs: A list of input jittor Vars
* in{x}, in{x}_shape{y}, in{x}_stride{y}, in{x}_type, in{x}_p, @in0(...)
* out{x}, out{x}_shape{y}, out{x}_stride{y}, out{x}_type, out{x}_p, @out0(...)
* out, out_shape{y}, out_stride{y}, out_type, out_p, @out(...)
* [in] cpu_grad_src: A list of string, cpu source code string for gradient, represents gradiant for each inputm buildin value, buildin value:
* [in] forward: function, represents forward python function
* in{x}, in{x}_shape{y}, in{x}_stride{y}, in{x}_type, in{x}_p, @in0(...)
* out{x}, out{x}_shape{y}, out{x}_stride{y}, out{x}_type, out{x}_p, @out0(...)
* out, out_shape{y}, out_stride{y}, out_type, out_p, @out(...)
* pout{x}, pout{x}_shape{y}, pout{x}_stride{y}, pout{x}_type, pout{x}_p, @pout{x}(...)
* pout, pout_shape{y}, pout_stride{y}, pout_type, pout_p, @pout(...)
* dout, dout_shape{y}, dout_stride{y}, dout_type, dout_p, @dout(...)
* [in] cpu_header: cpu header code string.
* [in] cuda_src: cuda source code string.
* [in] cuda_grad_src: A list of string.
* [in] cuda_header: cuda header code string.
* [in] backward: A list of function, represents gradiant for each input
----------------