magmadnn icon indicating copy to clipboard operation
magmadnn copied to clipboard

[BUG] Stack Smashing on stack allocated tensors

Open Dando18 opened this issue 5 years ago • 3 comments

Describe the bug Passing stack allocated tensor objects to some MagmaDNN functions causes stack smashing errors. The bug is somewhat unpredictable. It does not happen every run.

To Reproduce

model::NeuralNetwork<float> model( ... );

/* stack allocated */
Tensor<float> x( ... );
Tensor<float> y( ... );

/* this causes a stack smashing error, a non-negligent percentage of runs */
model.fit(&x, &y, ... );

Expected behavior No stack smashing.

Environment:

  • OS: Ubuntu 18.10
  • CUDA Version: 10.1
  • CBLAS: OpenBLAS
  • Magma Version: 2.5.2
  • CuDNN Version: 7.6
  • MagmaDNN Version 1.0

Additional context Due to magmadnn::Tensor<T>'s copy constructor and MemoryManager copying.

Dando18 avatar Jul 11 '19 17:07 Dando18