You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@singa.apache.org by GitBox <gi...@apache.org> on 2020/08/13 09:49:18 UTC

[GitHub] [singa] dcslin edited a comment on pull request #779: half float update

dcslin edited a comment on pull request #779:
URL: https://github.com/apache/singa/pull/779#issuecomment-672713946


   refactored https://github.com/apache/singa/pull/775
   #### half type:
   - `c++` add `half.hpp`
   - `c++` `f16<->f32` `singa::TypeCast` (scalar)
   - `cmake` add nvcc compilation flag arch 7.0 for fp16
   #### f16 tensor:
   - creation
     - `py` f16 `tensor.from_numpy()`
   - IO
     - set value
       - `c++` `f16` to `tensor::set_value()`
       - `c++` cast DType to SType in `Tensor::SetValue`
     - copy from numpy
       - `py` f16 `tensor.copy_from_numpy()`
       - `py` raise exception to `tensor.copy_from_numpy()` for unsupported type
       - `SWIG` API `CopyHalfFloatDataFromHostPtr`
     - get value
       - `c++` `f16` `Transform`: to make contiguous
       - `c++` explicit instantiation for `CopyDataFromHostPtr<f16>`
       - `SWIG` f16 typemaps
       - `SWIG` API `GetHalfFloatValue`
   - conversion
     - `py` f16 `tensor.as_type()`
     - `c++` `f16<->f32` `cpu/cuda` CastCopy
   - arithmetic
     - `c++` `f16<->f32` `cpu/cuda` `TYPE_LANG_SWITCH`
     - `c++` `f16<->f32` `cpu/cuda` `TYPE_TYPE_LANG_SWITCH`
     - `c++` `f16` `TYPE_SWITCH`
     - `c++` cast DType to SType in `EltwiseTensorScalarFn`
     - `c++` cast DType to SType in `Div` (scalar/tensor)
   - math
     - `c++` `f16` `cpu/cuda` Gaussian
     - `c++` use `GetCudnnDataType` in `generate_tensor_nd_desc` generic type support
   #### layer
   - `layer.dtype_check` to check inputs and params are in same dtype
   #### relu
   - `c++` f16 cuda math `ReLU`
     - `cuda` f16 `KernelRelu`
     - `cuda` f16 `cuda::relu` kernel wrapper
   #### linear
   - `py` f16 init params
   - `c++` f16 cuda math `GEMM`
   #### softmax cross entropy
   - `c++` f16 cuda math `EltwiseMult`
     - `cuda` f16 `KernelMult`
     - `cuda` f16 `cuda::mult` kernel wrapper
   - `c++` f16 cuda math `ComputeCrossEntropy`
     - `cuda` f16 `KernelComputeCrossEntropy`
     - `cuda` f16 `cuda::ComputeCrossEntropy` kernel wrapper
   - `c++` f16 cuda math `SoftMax`
   #### train cnn
   - add f16 option


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org