John O'Reilly
12/09/2020, 3:02 PMjaqxues
12/09/2020, 4:37 PMMichal Harakal
12/09/2020, 5:11 PMMichal Harakal
12/09/2020, 5:48 PMdef gpu_is_available():
"""
Returns True if Tensorflow is installed and uses GPU
"""
return tf.test.is_gpu_available()
Michal Harakal
12/09/2020, 7:26 PMklay
, DL4J
is included and it worked for me https://kotlinlang.slack.com/archives/C4W52CFEZ/p1601461062019100?thread_ts=1601217109.006900&cid=C4W52CFEZ
I will check it definitely later ....Michal Harakal
12/14/2020, 5:20 PMzaleslaw
12/28/2020, 6:51 PMMaria Khalusova
01/27/2021, 1:20 PMMichal Harakal
01/28/2021, 9:09 AMzaleslaw
02/23/2021, 2:36 PMenzo
04/06/2021, 4:23 PMРолан
04/12/2021, 6:40 PMРолан
04/16/2021, 5:50 PMРолан
04/16/2021, 5:56 PMkrangl
and kotlindl
that you might find helpful for introduction https://github.com/AndreiKingsley/KotlinDL-Jupyter-ExamplePeter
04/18/2021, 5:23 PM@file:Suppress("ConstantConditionIf")
import org.nd4j.linalg.api.ndarray.INDArray
import org.nd4j.linalg.indexing.NDArrayIndex
/**
* Add stride syntax to int ranges: 0..100..2
*
* @param step
* @return
*/
operator fun IntRange.rangeTo(step: Int) : IntProgression {
return IntProgression.fromClosedRange(first, last, step)
}
/**
* Simplify NDArray access: a[0..4, 16..32..2, END-10..END-5]
*
* @param indexes
* @return
*/
operator fun INDArray.get(vararg indexes: IntProgression) : INDArray {
var dimension = 0
val intervals = indexes.map {
val first = if (it.first < 0) size(dimension).toInt() + it.first + 1 else it.first
val last = if (it.last < 0) size(dimension).toInt() + it.last + 1 else it.last
dimension++
NDArrayIndex.interval(first, it.step, last, false)!!
}.toTypedArray()
return get(*intervals)
}
// Small trick so the compiler doesn't infer empty ranges
val END = if (true) -1 else 1
PS I don't really use this, so might contain some bugs.zaleslaw
04/27/2021, 10:32 AMHauke
05/31/2021, 7:01 AMAnsh Tyagi
05/31/2021, 10:00 PMsmallufo
06/03/2021, 3:53 PMРолан
06/20/2021, 8:06 AMAlexandre Brown
08/09/2021, 2:40 AMzaleslaw
09/28/2021, 5:37 PMspierce7
10/13/2021, 4:16 PMAlexander Klimov
11/21/2021, 7:14 PM2021-11-21 21:53:04.113570: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudart64_100.dll'; dlerror: cudart64_100.dll not found
2021-11-21 21:53:04.115569: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cublas64_100.dll'; dlerror: cublas64_100.dll not found
2021-11-21 21:53:04.117848: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cufft64_100.dll'; dlerror: cufft64_100.dll not found
2021-11-21 21:53:04.119929: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'curand64_100.dll'; dlerror: curand64_100.dll not found
2021-11-21 21:53:04.122027: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cusolver64_100.dll'; dlerror: cusolver64_100.dll not found
2021-11-21 21:53:04.124127: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cusparse64_100.dll'; dlerror: cusparse64_100.dll not found
2021-11-21 21:53:04.124151: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudnn64_7.dll
2021-11-21 21:53:04.124170: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1641] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at <https://www.tensorflow.org/install/gpu> for how to download and setup the required libraries for your platform.
Skipping registering GPU devices...
2021-11-21 21:53:04.124207: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1159] Device interconnect StreamExecutor with strength 1 edge matrix:
2021-11-21 21:53:04.124216: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1165] 0
2021-11-21 21:53:04.124223: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1178] 0: N
I work on WIN10
I have Nvidia CUDA libraries v11.5 installed in my system, but get this error anyway.
And I have the next records in my %PATH% varibale:
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.5\bin
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.5\libnvvp
spierce7
11/26/2021, 4:06 AMMartin Mitteregger
11/30/2021, 8:57 AMzaleslaw
12/02/2021, 7:51 AMAlexandre Brown
12/02/2021, 11:31 PMsmallshen
12/04/2021, 11:06 AMsmallshen
12/04/2021, 8:45 PM