Skip to content

Commit

Permalink
Using 16F for internal compute doesn't speed anything up.
Browse files Browse the repository at this point in the history
  • Loading branch information
liuliu committed Jan 2, 2024
1 parent f7e1aba commit 9f4b282
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions lib/nnc/cmd/blas/gpu/ccv_nnc_gemm_gpu_cublas.cu
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ static inline void _ccv_nnc_gbmm_and_bias(cublasHandle_t cublas, const void* con
one = &one_f16;
break;
case CUBLAS_COMPUTE_32F:
case CUBLAS_COMPUTE_32F_FAST_TF32:
one = &one_f32;
break;
case CUBLAS_COMPUTE_64F:
Expand Down Expand Up @@ -75,6 +76,7 @@ static inline void _ccv_nnc_gbmm(cublasHandle_t cublas, const unsigned char* con
one = &one_f16;
break;
case CUBLAS_COMPUTE_32F:
case CUBLAS_COMPUTE_32F_FAST_TF32:
one = &one_f32;
break;
case CUBLAS_COMPUTE_64F:
Expand Down Expand Up @@ -249,6 +251,7 @@ static inline void _ccv_nnc_gbmm_dbias(cublasHandle_t cublas, const int flags, c
one = &one_f16;
break;
case CUBLAS_COMPUTE_32F:
case CUBLAS_COMPUTE_32F_FAST_TF32:
one = &one_f32;
break;
case CUBLAS_COMPUTE_64F:
Expand Down Expand Up @@ -304,6 +307,7 @@ static inline void _ccv_nnc_gbmm_dw(cublasHandle_t cublas, const int flags, cons
one = &one_f16;
break;
case CUBLAS_COMPUTE_32F:
case CUBLAS_COMPUTE_32F_FAST_TF32:
one = &one_f32;
break;
case CUBLAS_COMPUTE_64F:
Expand Down Expand Up @@ -387,6 +391,7 @@ static inline void _ccv_nnc_gbmm_h(cublasHandle_t cublas, const int flags, const
one = &one_f16;
break;
case CUBLAS_COMPUTE_32F:
case CUBLAS_COMPUTE_32F_FAST_TF32:
one = &one_f32;
break;
case CUBLAS_COMPUTE_64F:
Expand Down
2 changes: 1 addition & 1 deletion lib/nnc/gpu/ccv_nnc_compat.cu
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ cublasComputeType_t ccv_nnc_cuda_compute_datatype(int datatype)
case CCV_32S:
return CUBLAS_COMPUTE_32F;
case CCV_16F:
return CUBLAS_COMPUTE_16F;
return CUBLAS_COMPUTE_32F;
case CCV_32F:
return CUBLAS_COMPUTE_32F;
case CCV_64F:
Expand Down

0 comments on commit 9f4b282

Please sign in to comment.