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/17 06:58:01 UTC

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

dcslin commented on a change in pull request #625: [wip]tensor.AsType()
URL: https://github.com/apache/singa/pull/625#discussion_r393475851
 
 

 ##########
 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:
   thank you for the suggestion. it is explicited now.

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