No compressors were found

[main] INFO org.nd4j.linalg.factory.Nd4jBackend - Loaded [JCublasBackend] backend
[main] INFO org.nd4j.nativeblas.NativeOpsHolder - Number of threads used for linear algebra: 32
[main] INFO org.nd4j.linalg.api.ops.executioner.DefaultOpExecutioner - Backend used: [CUDA]; OS: [Linux]
[main] INFO org.nd4j.linalg.api.ops.executioner.DefaultOpExecutioner - Cores: [4]; Memory: [3.0GB];
[main] INFO org.nd4j.linalg.api.ops.executioner.DefaultOpExecutioner - Blas vendor: [CUBLAS]
[main] INFO org.nd4j.linalg.jcublas.JCublasBackend - ND4J CUDA build version: 11.6.124
[main] INFO org.nd4j.linalg.jcublas.JCublasBackend - CUDA device 0: [NVIDIA GeForce GTX 1080 Ti]; cc: [6.1]; Total memory: [11721244672]
[main] INFO org.nd4j.linalg.jcublas.JCublasBackend - Backend build information:
GCC: “7.5.0”
STD version: 201103L
DEFAULT_ENGINE: samediff::ENGINE_CUDA
HAVE_FLATBUFFERS
HAVE_CUDNN
[main] ERROR org.nd4j.linalg.compression.BasicNDArrayCompressor - Error loading ND4J Compressors via service loader: No compressors were found. This usually occurs when running ND4J UI from an uber-jar, which was built incorrectly (without services resource files being included)
Exception in thread “main” java.lang.ExceptionInInitializerError
at org.nd4j.linalg.factory.Nd4j.getCompressor(Nd4j.java:5288)
at org.nd4j.linalg.api.ndarray.BaseNDArray.reshape(BaseNDArray.java:3754)
at org.nd4j.linalg.api.ndarray.BaseNDArray.reshape(BaseNDArray.java:3749)
at org.nd4j.linalg.api.ndarray.BaseNDArray.reshape(BaseNDArray.java:3872)
at org.nd4j.samediff.frameworkimport.IRProtobufExtensionsKt.ndarrayFromNameSpaceTensor(IRProtobufExtensions.kt:291)
at org.nd4j.samediff.frameworkimport.tensorflow.ir.TensorflowIRTensor.toNd4jNDArray(TensorflowIRTensor.kt:139)
at org.nd4j.samediff.frameworkimport.rule.attribute.NDArrayToIntAttributeValue.convertAttributes(NDArrayToIntAttributeValue.kt:56)
at org.nd4j.samediff.frameworkimport.process.AbstractMappingProcess.applyProcess(AbstractMappingProcess.kt:187)
at org.nd4j.samediff.frameworkimport.ir.IRFunctionsKt.importInfoForEachNodeInGraph(IRFunctions.kt:70)
at org.nd4j.samediff.frameworkimport.tensorflow.ir.TensorflowIRGraph.importInfoForEachNode(TensorflowIRGraph.kt:160)
at org.nd4j.samediff.frameworkimport.ImportGraph.importGraph(ImportGraph.kt:246)
at org.nd4j.samediff.frameworkimport.tensorflow.importer.TensorflowFrameworkImporter.importFromGraph(TensorflowFrameworkImporter.kt:65)
at org.nd4j.samediff.frameworkimport.tensorflow.importer.TensorflowFrameworkImporter.runImport(TensorflowFrameworkImporter.kt:74)

This error occurs on GPU on M2.1 in centos 8, both ND4J and SameDiff, tranning and inferrence. But the app run successfully on CPU in Windows 7.

@SidneyLann these errors seem very 1 off. I can clearly see the files in snapshots and the release: https://s01.oss.sonatype.org/service/local/repositories/snapshots/archive/org/nd4j/nd4j-cuda-11.4/1.0.0-SNAPSHOT/nd4j-cuda-11.4-1.0.0-20220215.235600-1.jar/!/nd4j-jcublas.properties

Are you actually getting a libc or version mismatch or something? Could you post some sort of a reproducer project? Your errors make zero sense to me and I don’t see anyone else mentioning this at all.

There are 2 same issues, and don’t know have they solved the problem?

The app can be run successfully if not used uber-jar.

@SidneyLann the stack trace also explains the problem though. That usually comes from files being missing. I don’t think it’s unreasonable for me to ask for a reproducer project.

Your pom would be a good start. If this actually is a problem and not just a configuration issue on your end then in order to fix it I need to reproduce it.

<properties>
	<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	<nd4j.backend>nd4j-cuda-11.6</nd4j.backend>
	<java.version>17</java.version>
	<dl4j.version>1.0.0-M2.1</dl4j.version>
</properties>

<dependencies>
	<dependency>
		<groupId>org.nd4j</groupId>
		<artifactId>${nd4j.backend}</artifactId>
		<version>${dl4j.version}</version>
	</dependency>
	<dependency>
		<groupId>org.nd4j</groupId>
		<artifactId>${nd4j.backend}</artifactId>
		<version>${dl4j.version}</version>
		<classifier>linux-x86_64-cudnn</classifier>
	</dependency>
	<dependency>
		<groupId>org.deeplearning4j</groupId>
		<artifactId>deeplearning4j-core</artifactId>
		<version>${dl4j.version}</version>
	</dependency>
	<dependency>
		<groupId>org.deeplearning4j</groupId>
		<artifactId>deeplearning4j-nn</artifactId>
		<version>${dl4j.version}</version>
	</dependency>
	<dependency>
		<groupId>org.deeplearning4j</groupId>
		<artifactId>deeplearning4j-ui</artifactId>
		<version>${dl4j.version}</version>
	</dependency>
	<dependency>
		<groupId>org.nd4j</groupId>
		<artifactId>samediff-import-tensorflow</artifactId>
		<version>${dl4j.version}</version>
	</dependency>

±----------------------------------------------------------------------------+
| NVIDIA-SMI 515.43.04 Driver Version: 515.43.04 CUDA Version: 11.7 |
|-------------------------------±---------------------±---------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce … Off | 00000000:01:00.0 Off | N/A |
| 0% 43C P8 12W / 280W | 20MiB / 11264MiB | 0% Default |
| | | N/A |
±------------------------------±---------------------±---------------------+

±----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 1910 G /usr/libexec/Xorg 9MiB |
| 0 N/A N/A 5240 G /usr/bin/gnome-shell 7MiB |
±----------------------------------------------------------------------------+

@SidneyLann just out of curiosity did you try with the default nd4j-cuda-11.6-platform? Also, did you check org.bytedeco.javacpp.logger.debug set to true? Given those files aren’t missing that usually means that’s the side effect of another problem (usually a native library missing)

If you’re using cudnn remember that you need the correct cudnn installed.

  1. cudnn installed correctly
    GCC: “7.5.0”
    STD version: 201103L
    DEFAULT_ENGINE: samediff::ENGINE_CUDA
    HAVE_FLATBUFFERS
    HAVE_CUDNN

  2. add -platform no help

  3. debug log no help
    Debug: Loading class org.bytedeco.javacpp.presets.javacpp
    Debug: Loading class org.bytedeco.javacpp.Loader
    Debug: Loading /home/sidney/.javacpp/cache/pcng-idea-ner-1.0.0-bin_M2.1.jar/org/bytedeco/javacpp/linux-x86_64/libjnijavacpp.so
    Debug: Loading class org.bytedeco.javacpp.presets.javacpp
    Debug: Loading class org.bytedeco.javacpp.Pointer
    Debug: Loading class org.bytedeco.javacpp.presets.javacpp
    Debug: Loading class org.bytedeco.cuda.global.cudart
    Debug: Loading library cudart
    Debug: Loading /home/sidney/.javacpp/cache/pcng-idea-ner-1.0.0-bin_M2.1.jar/org/bytedeco/cuda/linux-x86_64/libjnicudart.so
    Debug: Loading class org.bytedeco.javacpp.presets.javacpp
    Debug: Loading class org.bytedeco.cuda.global.cudart
    Debug: Loading class org.bytedeco.cuda.global.cublas
    Debug: Loading class org.bytedeco.javacpp.presets.javacpp
    Debug: Loading class org.bytedeco.cuda.global.cudart
    Debug: Loading class org.bytedeco.cuda.global.cublas
    Debug: Loading /usr/lib64/libcublasLt.so
    Debug: Loading /usr/lib64/libcublas.so
    Debug: Loading /home/sidney/.javacpp/cache/pcng-idea-ner-1.0.0-bin_M2.1.jar/org/bytedeco/cuda/linux-x86_64/libjnicublas.so
    [main] INFO org.nd4j.linalg.factory.Nd4jBackend - Loaded [JCublasBackend] backend
    Debug: Loading class org.nd4j.linalg.jcublas.bindings.Nd4jCuda
    Debug: Loading library curand
    Debug: Loading library cusolver
    Debug: Loading library cusparse
    Debug: Loading /lib64/libcudnn.so.8
    Debug: Loading /lib64/libcudnn_ops_infer.so.8
    Debug: Loading /lib64/libcudnn_ops_train.so.8
    Debug: Loading /lib64/libcudnn_adv_infer.so.8
    Debug: Loading /lib64/libcudnn_adv_train.so.8
    Debug: Loading /lib64/libcudnn_cnn_infer.so.8
    Debug: Loading /lib64/libcudnn_cnn_train.so.8
    Debug: Loading /lib64/libgomp.so.1
    Debug: Loading /home/sidney/.javacpp/cache/pcng-idea-ner-1.0.0-bin_M2.1.jar/org/nd4j/linalg/jcublas/bindings/linux-x86_64-cudnn/libnd4jcuda.so
    Debug: Loading /home/sidney/.javacpp/cache/pcng-idea-ner-1.0.0-bin_M2.1.jar/org/nd4j/linalg/jcublas/bindings/linux-x86_64-cudnn/libjnind4jcuda.so
    [main] INFO org.nd4j.nativeblas.NativeOpsHolder - Number of threads used for linear algebra: 32
    Debug: Loading class org.bytedeco.javacpp.presets.javacpp
    Debug: Loading class org.bytedeco.javacpp.PointerPointer
    Debug: Registering org.bytedeco.javacpp.PointerPointer[address=0x7fcdb4a8a870,position=0,limit=13,capacity=13,deallocator=org.bytedeco.javacpp.Pointer$NativeDeallocator[ownerAddress=0x7fcdb4a8a870,deallocatorAddress=0x7fcf1970e8d0]]
    [main] INFO org.nd4j.linalg.api.ops.executioner.DefaultOpExecutioner - Backend used: [CUDA]; OS: [Linux]
    [main] INFO org.nd4j.linalg.api.ops.executioner.DefaultOpExecutioner - Cores: [4]; Memory: [3.0GB];
    [main] INFO org.nd4j.linalg.api.ops.executioner.DefaultOpExecutioner - Blas vendor: [CUBLAS]
    Debug: Loading class org.bytedeco.javacpp.presets.javacpp
    Debug: Loading class org.bytedeco.javacpp.LongPointer
    Debug: Registering org.bytedeco.javacpp.LongPointer[address=0x7fcdb5af5f90,position=0,limit=2,capacity=2,deallocator=org.bytedeco.javacpp.Pointer$NativeDeallocator[ownerAddress=0x7fcdb5af5f90,deallocatorAddress=0x7fcf1970e830]]
    Debug: Registering org.bytedeco.javacpp.LongPointer[address=0x7fcdb5af6220,position=0,limit=2,capacity=2,deallocator=org.bytedeco.javacpp.Pointer$NativeDeallocator[ownerAddress=0x7fcdb5af6220,deallocatorAddress=0x7fcf1970e830]]
    Debug: Loading class org.bytedeco.javacpp.presets.javacpp
    Debug: Loading class org.bytedeco.javacpp.IntPointer
    Debug: Registering org.bytedeco.javacpp.IntPointer[address=0x7fcdb5b0a260,position=0,limit=1,capacity=1,deallocator=org.bytedeco.javacpp.Pointer$NativeDeallocator[ownerAddress=0x7fcdb5b0a260,deallocatorAddress=0x7fcf1970e810]]
    Debug: Registering org.bytedeco.javacpp.LongPointer[address=0x7fcd7e5ac980,position=0,limit=0,capacity=0,deallocator=org.bytedeco.javacpp.Pointer$NativeDeallocator[ownerAddress=0x7fcd7e5ac980,deallocatorAddress=0x7fcf1970e830]]
    Debug: Registering org.bytedeco.javacpp.LongPointer[address=0x7fcd7e5ac9a0,position=0,limit=0,capacity=0,deallocator=org.bytedeco.javacpp.Pointer$NativeDeallocator[ownerAddress=0x7fcd7e5ac9a0,deallocatorAddress=0x7fcf1970e830]]
    Debug: Registering org.bytedeco.javacpp.PointerPointer[address=0x7fcd7e5af460,position=0,limit=32,capacity=32,deallocator=org.bytedeco.javacpp.Pointer$NativeDeallocator[ownerAddress=0x7fcd7e5af460,deallocatorAddress=0x7fcf1970e8d0]]
    Debug: Registering org.bytedeco.javacpp.IntPointer[address=0x7fcd7e5b1500,position=0,limit=1,capacity=1,deallocator=org.bytedeco.javacpp.Pointer$NativeDeallocator[ownerAddress=0x7fcd7e5b1500,deallocatorAddress=0x7fcf1970e810]]
    Debug: Registering org.bytedeco.javacpp.IntPointer[address=0x7fcd7e5b1fa0,position=0,limit=1,capacity=1,deallocator=org.bytedeco.javacpp.Pointer$NativeDeallocator[ownerAddress=0x7fcd7e5b1fa0,deallocatorAddress=0x7fcf1970e810]]
    Debug: Registering org.bytedeco.javacpp.IntPointer[address=0x7fcd7e649ee0,position=0,limit=1,capacity=1,deallocator=org.bytedeco.javacpp.Pointer$NativeDeallocator[ownerAddress=0x7fcd7e649ee0,deallocatorAddress=0x7fcf1970e810]]
    Debug: Registering org.bytedeco.javacpp.LongPointer[address=0x7fcd7e649f00,position=0,limit=2,capacity=2,deallocator=org.bytedeco.javacpp.Pointer$NativeDeallocator[ownerAddress=0x7fcd7e649f00,deallocatorAddress=0x7fcf1970e830]]
    Debug: Registering org.bytedeco.javacpp.LongPointer[address=0x7fcd7e649f20,position=0,limit=2,capacity=2,deallocator=org.bytedeco.javacpp.Pointer$NativeDeallocator[ownerAddress=0x7fcd7e649f20,deallocatorAddress=0x7fcf1970e830]]
    [main] ERROR org.nd4j.linalg.compression.BasicNDArrayCompressor - Error loading ND4J Compressors via service loader: No compressors were found. This usually occurs when running ND4J UI from an uber-jar, which was built incorrectly (without services resource files being included)

@SidneyLann Looking at this I guess it’s due to the nd4j-cuda dependency not having a compressor implementation. As usual the “real” reason for that isn’t just “this was wrong”. We have a good setup for cpu for compression but compression + GPU is going to introduce all sorts of bugs which is why we don’t have one.

It will take some work to do correctly so I may just allow it to not have one defined. Let me get back to you on a proper fix after a bit more thinking.

OK. now to use non-uber-jar for temp use. Thanks.

@SidneyLann Adds cuda compressor by agibsonccc · Pull Request #9794 · deeplearning4j/deeplearning4j · GitHub this needs more testing yet but it seems like the initial issues are already addressed with the way the cpu compressor is implemented. I just added a backend specific one.

Ok. I will try after new snapshot build.