Skip to content
Snippets Groups Projects
Commit 48c45350 authored by Houssem ROUIS's avatar Houssem ROUIS
Browse files

fix type for AvgPooling test

parent f517018e
Branches
Tags
3 merge requests!15version 0.2.0,!12Lenetop,!10Lenet operators
Pipeline #42245 failed
...@@ -148,8 +148,8 @@ TEST_CASE("[gpu/operator] AvgPooling(forward)", "[AvgPooling][GPU]") { ...@@ -148,8 +148,8 @@ TEST_CASE("[gpu/operator] AvgPooling(forward)", "[AvgPooling][GPU]") {
op->computeOutputDims(); op->computeOutputDims();
myAvgPool->forward(); myAvgPool->forward();
half* computedOutput = new half[myOutput->size()](); half_float::half* computedOutput = new half_float::half[myOutput->size()]();
cudaMemcpy(computedOutput, op->getOutput(0)->getImpl()->rawPtr(), sizeof(half) * myOutput->size(), cudaMemcpyDeviceToHost); cudaMemcpy(computedOutput, op->getOutput(0)->getImpl()->rawPtr(), sizeof(half_float::half) * myOutput->size(), cudaMemcpyDeviceToHost);
for(int i = 0; i < myOutput->size(); i++){ for(int i = 0; i < myOutput->size(); i++){
const half_float::half targetOutput = *(static_cast<half_float::half*>(myOutput->getImpl()->rawPtr()) + i); const half_float::half targetOutput = *(static_cast<half_float::half*>(myOutput->getImpl()->rawPtr()) + i);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment