Skip to content
Snippets Groups Projects
Commit 2d392d87 authored by Charles Villard's avatar Charles Villard
Browse files

edit: ILayerNorm: fixed test

parent af3da233
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,9 @@
#include <thrust/device_ptr.h>
template <typename SRC_T, typename DST_T>
typename std::enable_if<!std::is_same<half_float::half, DST_T>::value && !std::is_same<half_float::half, SRC_T>::value>::type
typename std::enable_if<!std::is_same<half_float::half, DST_T>::value &&
!std::is_same<half_float::half, SRC_T>::value>
::type
Aidge::thrust_copy(const SRC_T* srcData, DST_T* dstData, size_t size)
{
const thrust::device_ptr<const SRC_T> thrustSrcPtr(srcData);
......
......@@ -62,7 +62,7 @@ __global__ void ILayerNormforward_(T* input, double SF, int* dims, int* quantize
k = floorf((k + floorf(sum / k))/2);
}
unsigned int factor = (((1u << 31) - 1) / k);
long factor = (((1u << 31) - 1) / k);
for (int i = 0; i < dims[3]; i++) {
int idx = maxIdx + i;
square_tensor[idx] = (biase[idx]/weight[idx])/new_SF;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment