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/03/13 05:46:13 UTC

[GitHub] [singa] nudles commented on a change in pull request #625: tensor.AsType()

nudles commented on a change in pull request #625: tensor.AsType()
URL: https://github.com/apache/singa/pull/625#discussion_r392040380
 
 

 ##########
 File path: src/core/tensor/math_kernel.cu
 ##########
 @@ -184,6 +184,20 @@ __global__ void KernelAbs(const size_t n, const float *in, float *out) {
   }
 }
 
+__global__ void KernelAsType2(const size_t n, const float *in, int *out) {
+  for (int i = blockIdx.x * blockDim.x + threadIdx.x; i < n;
+       i += blockDim.x * gridDim.x) {
+    out[i] = in[i];
 
 Review comment:
   better make it explicit. 

----------------------------------------------------------------
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


With regards,
Apache Git Services