diff --git a/llvm/projects/keras/cmake_template/CMakeLists.txt b/llvm/projects/keras/cmake_template/CMakeLists.txt
index 67ce4a848b4de67c15cc2a8de032f6dd063d6fc7..0cdee697ce2d663775f0283e96f35c45fd467986 100644
--- a/llvm/projects/keras/cmake_template/CMakeLists.txt
+++ b/llvm/projects/keras/cmake_template/CMakeLists.txt
@@ -50,7 +50,7 @@ find_library(TENSOR_LIB
   )
 
 
-set(LINK_LIBS cudart cudnn cufft cublas stdc++fs curand)
+set(LINK_LIBS cudart cudnn cufft cublas stdc++fs curand -pthread)
 
 #### Image Processing Benchmarks