From 78444bc2ebfff541609c2a2f5ec877c104124d9e Mon Sep 17 00:00:00 2001 From: Hieu Hoang Date: Fri, 16 Sep 2016 14:50:14 +0100 Subject: [PATCH] can call gSoftmax --- src/expression_graph.cu | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/expression_graph.cu b/src/expression_graph.cu index b85c7223..cc0d9fb9 100644 --- a/src/expression_graph.cu +++ b/src/expression_graph.cu @@ -46,9 +46,9 @@ void temp() std::vector hVec({1,2, 4,3, 7,9, 7,3}); thrust::device_vector dVec(8); thrust::copy(hVec.begin(), hVec.end(), dVec.begin()); - float *data = hVec.data(); + float *data = thrust::raw_pointer_cast(dVec.data()); - gSoftMax<<<2, 4>>>(data, 2, 4); + gSoftMax<<<4, 2, sizeof(float)>>>(data, 4, 2); std::vector hVec2(8); thrust::copy(dVec.begin(), dVec.end(), hVec2.begin()); @@ -66,6 +66,7 @@ ExpressionGraph::ExpressionGraph(int cudaDevice) cudaSetDevice(0); temp(); + exit(0); } }