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

fix onesVector for FCImpl

parent 12c56d5e
No related branches found
No related tags found
No related merge requests found
...@@ -61,8 +61,8 @@ void Aidge::FCImpl_cuda::forward_(const Tensor& input0, const Tensor& input1, co ...@@ -61,8 +61,8 @@ void Aidge::FCImpl_cuda::forward_(const Tensor& input0, const Tensor& input1, co
int lda = k; int lda = k;
int ldb = k; int ldb = k;
int ldc = n; int ldc = n;
const T alpha = 1.0; const T alpha = T(1.0);
const T beta = 0.0; const T beta = T(0.0);
CHECK_CUBLAS_STATUS(cublasGemm(CudaContext::cublasHandle(), CHECK_CUBLAS_STATUS(cublasGemm(CudaContext::cublasHandle(),
CUBLAS_OP_T, CUBLAS_OP_T,
CUBLAS_OP_N, CUBLAS_OP_N,
...@@ -80,9 +80,9 @@ void Aidge::FCImpl_cuda::forward_(const Tensor& input0, const Tensor& input1, co ...@@ -80,9 +80,9 @@ void Aidge::FCImpl_cuda::forward_(const Tensor& input0, const Tensor& input1, co
if(!noBias){ if(!noBias){
T* onesVector; T* onesVector;
cudaMalloc((void**)&onesVector, outChannels * sizeof(T)); cudaMalloc((void**)&onesVector, m * sizeof(T));
// Fill the vector with ones // Fill the vector with ones
std::vector<T> onesVec(m, 1.0f); std::vector<T> onesVec(m, T(1.0));
CHECK_CUDA_STATUS(cudaMemcpy(onesVector, CHECK_CUDA_STATUS(cudaMemcpy(onesVector,
&onesVec[0], &onesVec[0],
m * sizeof(T), m * sizeof(T),
......
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