singa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [singa] dcslin commented on a change in pull request #625: tensor.AsType()
Date Fri, 13 Mar 2020 02:52:16 GMT
dcslin commented on a change in pull request #625: tensor.AsType()
URL: https://github.com/apache/singa/pull/625#discussion_r392003311
 
 

 ##########
 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:
   I think it is working as implicit casting 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

Mime
View raw message