Skip to content

Commit

Permalink
fix issue BVLC#6389
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj authored and jkelling committed Jul 12, 2021
1 parent dc83728 commit 23e164d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/caffe/test/test_syncedmem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ TEST_F(SyncedMemoryTest, TestGPURead) {
char* recovered_value = new char[10];
caffe_gpu_memcpy(10, gpu_data, recovered_value);
for (int i = 0; i < mem.size(); ++i) {
EXPECT_EQ((static_cast<char*>(recovered_value))[i], 1);
EXPECT_EQ(recovered_value[i], 1);
}
// do another round
cpu_data = mem.mutable_cpu_data();
Expand All @@ -94,7 +94,7 @@ TEST_F(SyncedMemoryTest, TestGPURead) {
// check if values are the same
caffe_gpu_memcpy(10, gpu_data, recovered_value);
for (int i = 0; i < mem.size(); ++i) {
EXPECT_EQ((static_cast<char*>(recovered_value))[i], 2);
EXPECT_EQ(recovered_value[i], 2);
}
delete[] recovered_value;
}
Expand Down

0 comments on commit 23e164d

Please sign in to comment.