diff --git a/src/TNL/Devices/Cuda.cu b/src/TNL/Devices/Cuda.cu
index e12517f560efa58213369db7b41c07a4750a9d2a..21fbfdc1fc4e7de63f237b1e35ce8670f51fe137 100644
--- a/src/TNL/Devices/Cuda.cu
+++ b/src/TNL/Devices/Cuda.cu
@@ -36,15 +36,6 @@ bool Cuda::setup( const tnlParameterContainer& parameters,
 }
 */
 
-int Cuda::getDeviceId()
-{
-   int id( 0 );
-#ifdef HAVE_CUDA
-   cudaGetDevice( &id );
-#endif
-   return id;
-}
-
 bool Cuda::checkDevice( const char* file_name, int line, cudaError error )
 {   
    if( error == cudaSuccess )
diff --git a/src/TNL/Devices/Cuda.h b/src/TNL/Devices/Cuda.h
index b83e0bb119c5e8b03b4dff1497f5892b7cfd28e8..ff7471137fbac71b82c274c44dc2137aa099d7cb 100644
--- a/src/TNL/Devices/Cuda.h
+++ b/src/TNL/Devices/Cuda.h
@@ -49,8 +49,6 @@ class Cuda
    static inline constexpr int getGPUTransferBufferSize();
 
 #ifdef HAVE_CUDA
-   static int getDeviceId();
-   
    template< typename Index >
    __device__ static Index getGlobalThreadIdx( const Index gridIdx = 0 );
 #endif