etaler / Etaler

A flexable HTM (Hierarchical Temporal Memory) framework with full GPU support.
BSD 3-Clause "New" or "Revised" License
89 stars 14 forks source link

Concat test failed when using OpenCL on Nvidia GPU #65

Closed marty1885 closed 5 years ago

marty1885 commented 5 years ago

The concat operation test CHECK( cat({a, d}, 1).isSame(sol2) ) failed with running on a Nvidia card. But works on CPU or Intel iGPU.

marty1885 commented 5 years ago

If you extract the code and print the contents.

Tensor a = ones({2, 2});
Tensor d = zeros({2, 3});
std::cout << cat({a, d}, /*dim=*/1) << std::endl;

Tensor sol2 = ones({2, 5});
sol2.view({all(), range(2, 5)}) = 0;
std::cout << sol2 << std::endl;

It prints:

{{ 1, 1, 0, 0, 0}, 
 { 1, 1, 0, 0, 0}}
{{ 1, 1, 0, 1, 0}, 
 { 1, 1, 0, 0, 1}}

Looke like we have a bug in the view. That's gonna take a while to debug.