deepjavalibrary / djl

An Engine-Agnostic Deep Learning Framework in Java
https://djl.ai
Apache License 2.0
4.12k stars 654 forks source link

torch_cuda.dll , The specified program could not be found. #1538

Closed 1193700079 closed 2 years ago

1193700079 commented 2 years ago

i have a problem

But I have successfully installed it.

ai.djl.engine.EngineException: Failed to load PyTorch native library
    at ai.djl.pytorch.engine.PtEngine.newInstance(PtEngine.java:77)
    at ai.djl.pytorch.engine.PtEngineProvider.getEngine(PtEngineProvider.java:40)
    at ai.djl.engine.Engine.getEngine(Engine.java:168)
    at ai.djl.Model.newInstance(Model.java:98)
    at ai.djl.repository.zoo.BaseModelLoader.createModel(BaseModelLoader.java:187)
    at ai.djl.repository.zoo.BaseModelLoader.loadModel(BaseModelLoader.java:149)
    at ai.djl.repository.zoo.Criteria.loadModel(Criteria.java:166)
    at ai.djl.repository.zoo.ModelZoo.loadModel(ModelZoo.java:123)
    at Yolov5sTest.main(Yolov5sTest.java:109)
Caused by: java.lang.UnsatisfiedLinkError: C:\Users\yrq\.djl.ai\pytorch\1.9.0-cu102-win-x86_64\torch_cuda.dll: 找不到指定的程序。
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
    at java.lang.Runtime.load0(Runtime.java:809)
    at java.lang.System.load(System.java:1086)
    at ai.djl.pytorch.jni.LibUtils.loadNativeLibrary(LibUtils.java:351)
    at ai.djl.pytorch.jni.LibUtils.loadWinDependencies(LibUtils.java:151)
    at ai.djl.pytorch.jni.LibUtils.loadLibrary(LibUtils.java:75)
    at ai.djl.pytorch.engine.PtEngine.newInstance(PtEngine.java:50)
    ... 8 more
Process finished with exit code 0

image

This is myCode

import ai.djl.Device;
import ai.djl.MalformedModelException;
import ai.djl.ModelException;
import ai.djl.inference.Predictor;
import ai.djl.modality.cv.Image;
import ai.djl.modality.cv.ImageFactory;
import ai.djl.modality.cv.output.BoundingBox;
import ai.djl.modality.cv.output.DetectedObjects;
import ai.djl.modality.cv.output.Rectangle;
import ai.djl.modality.cv.translator.YoloV5Translator;
import ai.djl.repository.zoo.Criteria;
import ai.djl.repository.zoo.ModelNotFoundException;
import ai.djl.repository.zoo.ModelZoo;
import ai.djl.repository.zoo.ZooModel;
import ai.djl.translate.TranslateException;
import ai.djl.translate.Translator;
import org.opencv.core.*;
import org.opencv.highgui.HighGui;
import org.opencv.imgproc.Imgproc;
import org.opencv.videoio.VideoCapture;

import java.io.IOException;

/**
 * @author yrq
 * @version 1.0
 * @description: TODO
 * @date 2022/3/22 12:33
 */
public class Yolov5sTest {
    static {
        //加载opencv
        System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
    }

    static Rect rect = new Rect();
    static Scalar color = new Scalar(0, 255, 0);

    public static Image mat2Image(Mat mat) {
        return ImageFactory.getInstance().fromImage(HighGui.toBufferedImage(mat));
    }
    static void detect(Mat frame, ZooModel<Image, DetectedObjects> model) throws IOException, ModelNotFoundException, MalformedModelException, TranslateException {

        Image img = mat2Image(frame);
        long startTime = System.currentTimeMillis();
        try (Predictor<Image, DetectedObjects> predictor = model.newPredictor()) {

            DetectedObjects results = predictor.predict(img);
            for (DetectedObjects.DetectedObject obj : results.<DetectedObjects.DetectedObject>items()) {

                BoundingBox bbox = obj.getBoundingBox();
                Rectangle rectangle = bbox.getBounds();
                String showText = String.format("%s: %.2f", obj.getClassName(), obj.getProbability());
                rect.x = (int) rectangle.getX();
                rect.y = (int) rectangle.getY();
                rect.width = (int) rectangle.getWidth();
                rect.height = (int) rectangle.getHeight();
                // 画框

                Imgproc.rectangle(frame, rect, color, 2);
                //画名字
                Imgproc.putText(frame, showText,
                        new Point(rect.x, rect.y),
                        Imgproc.FONT_HERSHEY_COMPLEX,
                        rectangle.getWidth() / 200,
                        color);
            }
        }
        System.out.println(String.format("%.2f", 1000.0 / (System.currentTimeMillis() - startTime)));
    }
    public static void main(String[] args) {
        System.out.println(Yolov5sTest.class.getResource("/yolov5s").getPath());
        Translator<Image, DetectedObjects> translator = YoloV5Translator.builder().optSynsetArtifactName("coco.names").build();
        Criteria<Image, DetectedObjects> criteria =
                Criteria.builder()
                        .setTypes(Image.class, DetectedObjects.class)
                        .optDevice(Device.cpu())
                        .optModelUrls(Yolov5sTest.class.getResource("/yolov5s").getPath())
                        .optModelName("yolov5s.torchscript.pt")
                        .optTranslator(translator)
                        .optEngine("PyTorch")
                        .build();
        try (ZooModel<Image, DetectedObjects> model = ModelZoo.loadModel(criteria)) {
            String rtsp = "";
            VideoCapture cap = new VideoCapture(rtsp);
            if (!cap.isOpened()) {
                //isOpened函数用来判断摄像头调用是否成功
                System.out.println("Camera Error");//如果摄像头调用失败,输出错误信息
            } else {

                Mat frame = new Mat();//创建一个输出帧
                boolean flag = cap.read(frame);//read方法读取摄像头的当前帧
                while (flag) {

                    detect(frame, model);
                    HighGui.imshow("yolov5", frame);
                    HighGui.waitKey(20);
                    flag = cap.read(frame);
                }
            }

        } catch (RuntimeException | ModelException | TranslateException | IOException e) {

            e.printStackTrace();
        }
    }
}
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.example</groupId>
    <artifactId>djl_study</artifactId>
    <version>1.0-SNAPSHOT</version>

    <properties>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
        <djl.version>0.13.0</djl.version>
        <slf4j.version>1.7.36</slf4j.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>ai.djl</groupId>
            <artifactId>api</artifactId>
            <version>${djl.version}</version>
        </dependency>
        <dependency>
            <groupId>ai.djl.pytorch</groupId>
            <artifactId>pytorch-model-zoo</artifactId>
            <version>${djl.version}</version>
        </dependency>
        <dependency>
            <groupId>ai.djl.pytorch</groupId>
            <artifactId>pytorch-engine</artifactId>
            <version>${djl.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>ai.djl.pytorch</groupId>
            <artifactId>pytorch-native-auto</artifactId>
            <version>1.9.0</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>${slf4j.version}</version>
        </dependency>
    </dependencies>

</project>
1193700079 commented 2 years ago

please help me ~ thanks ~

frankfliu commented 2 years ago

@1193700079 A few things to try:

  1. You might need install Visual C++ 2019 Redistributable Packages and reboot. See: https://docs.djl.ai/master/docs/development/troubleshooting.html#13-unsatisfiedlinkerror-issue
  2. Upgrade to latest version of DJL: 0.16.0
  3. clone djl source code and run debugEnv from command line can capture debug log:
    git clone https://github.com/deepjavalibrary/djl.git
    cd djl
    gradlew debugEnv
1193700079 commented 2 years ago

ok thank you , let me try

frankfliu commented 2 years ago

@1193700079 one more thing you might want to check, which cudnn version are you using?

pytorch 1.9.1 uses cudnn7, and pytorch 1.10.0 requires cudnn8

1193700079 commented 2 years ago

ok thank you , let me try

this is my result gradlew debugEnv

cuDNN 8.3.3
CUDA version 10.2

(base) PS C:\Users\yrq\Desktop\djl> .\gradlew.bat debugEnv Couldn't find C:\Users\yrq\Desktop\djl\gradle\wrapper\gradle-wrapper.jar, downloading it ... Downloading from: "https://raw.githubusercontent.com/gradle/gradle/master/gradle/wrapper/gradle-wrapper.jar" Finished downloading C:\Users\yrq\Desktop\djl\gradle\wrapper\gradle-wrapper.jar Downloading https://services.gradle.org/distributions/gradle-7.4.1-bin.zip ...........10%...........20%...........30%...........40%...........50%...........60%...........70%...........80%...........90%...........100% Starting a Gradle Daemon (subsequent builds will be faster)

Task :integration:debugEnv [DEBUG] - Registering EngineProvider: XGBoost [DEBUG] - Registering EngineProvider: MXNet [DEBUG] - Registering EngineProvider: PyTorch [DEBUG] - Registering EngineProvider: TensorFlow [DEBUG] - Found default engine: MXNet ----------- System Properties ----------- sun.cpu.isalist: amd64 sun.desktop: windows sun.io.unicode.encoding: UnicodeLittle sun.cpu.endian: little java.vendor.url.bug: http://bugreport.sun.com/bugreport/ file.separator: \ java.vendor: Oracle Corporation sun.boot.class.path: C:\Program Files\Java\jdk1.8.0_144\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\rt.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_144\jre\classes java.ext.dirs: C:\Program Files\Java\jdk1.8.0_144\jre\lib\ext;C:\Windows\Sun\Java\lib\ext java.version: 1.8.0_144 java.vm.info: mixed mode awt.toolkit: sun.awt.windows.WToolkit user.language: zh java.specification.vendor: Oracle Corporation sun.java.command: ai.djl.integration.util.DebugEnvironment java.home: C:\Program Files\Java\jdk1.8.0_144\jre sun.arch.data.model: 64 java.vm.specification.version: 1.8 java.class.path: C:\Users\yrq\Desktop\djl\integration\build\classes\java\main;C:\Users\yrq\Desktop\djl\integration\build\resources\main;C:\Users\yrq.gradle\caches\modules-2\files-2.1\commons-cli\commons-cli\1.5.0\dc98be5d5390230684a092589d70ea76a147925c\commons-cli-1.5.0.jar;C:\Users\yrq.gradle\caches\modules-2\files-2.1\org.apache.logging.log4j\log4j-slf4j-impl\2.17.2\183f7c95fc981f3e97d008b363341343508848e\log4j-slf4j-impl-2.17.2.jar;C:\Users\yrq\Desktop\djl\basicdataset\build\libs\basicdataset-0.17.0-SNAPSHOT.jar;C:\Users\yrq\Desktop\djl\model-zoo\build\libs\model-zoo-0.17.0-SNAPSHOT.jar;C:\Users\yrq\Desktop\djl\testing\build\libs\testing-0.17.0-SNAPSHOT.jar;C:\Users\yrq.gradle\caches\modules-2\files-2.1\org.testng\testng\7.5\1416a607fae667c14e390b484e8d02b5824c0674\testng-7.5.jar;C:\Users\yrq\Desktop\djl\engines\mxnet\mxnet-model-zoo\build\libs\mxnet-model-zoo-0.17.0-SNAPSHOT.jar;C:\Users\yrq\Desktop\djl\engines\pytorch\pytorch-model-zoo\build\libs\pytorch-model-zoo-0.17.0-SNAPSHOT.jar;C:\Users\yrq\Desktop\djl\engines\tensorflow\tensorflow-model-zoo\build\libs\tensorflow-model-zoo-0.17.0-SNAPSHOT.jar;C:\Users\yrq\Desktop\djl\engines\ml\xgboost\build\libs\xgboost-0.17.0-SNAPSHOT.jar;C:\Users\yrq\Desktop\djl\engines\mxnet\mxnet-engine\build\libs\mxnet-engine-0.17.0-SNAPSHOT.jar;C:\Users\yrq\Desktop\djl\engines\pytorch\pytorch-engine\build\libs\pytorch-engine-0.17.0-SNAPSHOT.jar;C:\Users\yrq\Desktop\djl\engines\tensorflow\tensorflow-engine\build\libs\tensorflow-engine-0.17.0-SNAPSHOT.jar;C:\Users\yrq\Desktop\djl\api\build\libs\api-0.17.0-SNAPSHOT.jar;C:\Users\yrq.gradle\caches\modules-2\files-2.1\org.slf4j\slf4j-api\1.7.36\6c62681a2f655b49963a5983b8b0950a6120ae14\slf4j-api-1.7.36.jar;C:\Users\yrq.gradle\caches\modules-2\files-2.1\org.apache.logging.log4j\log4j-core\2.17.2\fa43ba4467f5300b16d1e0742934149bfc5ac564\log4j-core-2.17.2.jar;C:\Users\yrq.gradle\caches\modules-2\files-2.1\org.apache.logging.log4j\log4j-api\2.17.2\f42d6afa111b4dec5d2aea0fe2197240749a4ea6\log4j-api-2.17.2.jar;C:\Users\yrq.gradle\caches\modules-2\files-2.1\org.apache.commons\commons-csv\1.9.0\b59d8f64cd0b83ee1c04ff1748de2504457018c1\commons-csv-1.9.0.jar;C:\Users\yrq.gradle\caches\modules-2\files-2.1\com.google.code.findbugs\jsr305\3.0.1\f7be08ec23c21485b9b5a1cf1654c2ec8c58168d\jsr305-3.0.1.jar;C:\Users\yrq.gradle\caches\modules-2\files-2.1\com.beust\jcommander\1.78\a3927de9bd6f351429bcf763712c9890629d8f51\jcommander-1.78.jar;C:\Users\yrq.gradle\caches\modules-2\files-2.1\org.webjars\jquery\3.5.1\2392938e374f561c27c53872bdc9b6b351b6ba34\jquery-3.5.1.jar;C:\Users\yrq.gradle\caches\modules-2\files-2.1\ml.dmlc\xgboost4j_2.12\1.4.1\3c769c6be531e06e20b2ac4e18d7d0cd75c0f1bb\xgboost4j_2.12-1.4.1.jar;C:\Users\yrq.gradle\caches\modules-2\files-2.1\commons-logging\commons-logging\1.2\4bfc12adfe4842bf07b657f0369c4cb522955686\commons-logging-1.2.jar;C:\Users\yrq.gradle\caches\modules-2\files-2.1\com.google.code.gson\gson\2.9.0\8a1167e089096758b49f9b34066ef98b2f4b37aa\gson-2.9.0.jar;C:\Users\yrq.gradle\caches\modules-2\files-2.1\net.java.dev.jna\jna\5.10.0\7cf4c87dd802db50721db66947aa237d7ad09418\jna-5.10.0.jar;C:\Users\yrq.gradle\caches\modules-2\files-2.1\org.apache.commons\commons-compress\1.21\4ec95b60d4e86b5c95a0e919cb172a0af98011ef\commons-compress-1.21.jar;C:\Users\yrq\Desktop\djl\engines\tensorflow\tensorflow-api\build\libs\tensorflow-api-0.17.0-SNAPSHOT.jar;C:\Users\yrq.gradle\caches\modules-2\files-2.1\org.tensorflow\tensorflow-core-api\0.4.0\2ac35ca087607cce0e5419953cc1ef0c3a5edaea\tensorflow-core-api-0.4.0.jar;C:\Users\yrq.gradle\caches\modules-2\files-2.1\org.bytedeco\javacpp\1.5.6\1f18a820aadd943577b0b372554f9e35e1232e25\javacpp-1.5.6.jar;C:\Users\yrq.gradle\caches\modules-2\files-2.1\com.google.protobuf\protobuf-java\3.19.2\e958ce38f96b612d3819ff1c753d4d70609aea74\protobuf-java-3.19.2.jar;C:\Users\yrq.gradle\caches\modules-2\files-2.1\org.tensorflow\ndarray\0.3.3\1b6d8cc3e3762f6e465b884580d9fc17ab7aeb4\ndarray-0.3.3.jar user.name: yrq ai.djl.logging.level: debug file.encoding: GBK java.specification.version: 1.8 java.awt.printerjob: sun.awt.windows.WPrinterJob user.timezone: Asia/Shanghai user.home: C:\Users\yrq library.jansi.path: C:\Users\yrq.gradle\native\jansi\1.18\windows64 os.version: 10.0 sun.management.compiler: HotSpot 64-Bit Tiered Compilers java.specification.name: Java Platform API Specification java.class.version: 52.0 org.gradle.internal.http.connectionTimeout: 60000 java.library.path: C:\Program Files\Java\jdk1.8.0_144\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;I:\Anaconda3;I:\Anaconda3\Library\mingw-w64\bin;I:\Anaconda3\Library\usr\bin;I:\Anaconda3\Library\bin;I:\Anaconda3\Scripts;I:\Anaconda3\bin;I:\Anaconda3\condabin;C:\Python310\Scripts;C:\Python310;C:\Program Files\Java\jdk1.8.0_144\bin;C:\Program Files\Java\jdk1.8.0_144\jre\bin;I:\Anaconda3;I:\Anaconda3\Library\mingw-w64\bin;I:\Anaconda3\Library\usr\bin;I:\Anaconda3\Library\bin;I:\Anaconda3\Scripts;D:\VM PRO16\bin;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit;C:\cuda\bin;G:\Anaconda\envs\tensorflow-gpu\Scripts;C:\Users\yrq\AppData\Local\Yarn\bin;D:\Git\cmd;D:\mysql-8.0.23-winx64\bin;G:\maven\apache-maven-3.6.3\bin;G:\web\apache-tomcat-9.0.45\bin;G:\web\apache-tomcat-9.0.45\lib;C:\Program Files\Java\jdk1.8.0_144\bin;D:\mingw64\bin;D:\Git\bin;D:\mongodb\bin;D:\hadoop-common-2.2.0-bin-master\bin;D:\erl9.2\bin;C:\Users\yrq\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Users\yrq\AppData\Roaming\nvm;C:\Program Files\Go\bin;D:\download\platform-tools_r31.0.3-windows\platform-tools;D:\nodejs;C:\ProgramData\chocolatey\bin;D:\gradle-7.4.1\bin;C:\Users\yrq\AppData\Local\Programs\Python\Python39\Scripts;C:\Users\yrq\AppData\Local\Programs\Python\Python39;C:\Users\yrq\AppData\Local\Microsoft\WindowsApps;G:\PyCharm 2020.3.2\bin;G:\IntelliJ IDEA 2021.1.3\bin;D:\neo4j-community-3.5.4-windows\bin;G:\Microsoft VS Code\bin;C:\Users\yrq\go\bin;D:\download\ffmpeg-n4.4.1-2-gcc33e73618-win64-lgpl-shared-4.4\bin;C:\Users\yrq\AppData\Roaming\npm;. org.gradle.internal.publish.checksums.insecure: true sun.jnu.encoding: GBK os.name: Windows 10 user.variant: java.vm.specification.vendor: Oracle Corporation org.gradle.appname: gradlew java.io.tmpdir: C:\Users\yrq\AppData\Local\Temp\ line.separator:

java.endorsed.dirs: C:\Program Files\Java\jdk1.8.0_144\jre\lib\endorsed os.arch: amd64 java.awt.graphicsenv: sun.awt.Win32GraphicsEnvironment java.runtime.version: 1.8.0_144-b01 java.vm.specification.name: Java Virtual Machine Specification user.dir: C:\Users\yrq\Desktop\djl\integration org.gradle.internal.http.socketTimeout: 120000 user.country: CN user.script: sun.java.launcher: SUN_STANDARD sun.os.patch.level: java.vm.name: Java HotSpot(TM) 64-Bit Server VM file.encoding.pkg: sun.io path.separator: ; java.vm.vendor: Oracle Corporation java.vendor.url: http://java.oracle.com/ sun.boot.library.path: C:\Program Files\Java\jdk1.8.0_144\jre\bin;C:\Program Files\Java\jdk1.8.0_144\jre\bin java.vm.version: 25.144-b01 java.runtime.name: Java(TM) SE Runtime Environment

--------- Environment Variables --------- USERDOMAIN_ROAMINGPROFILE: DESKTOP-PFQ9UMH WT_SESSION: 8e2c95c7-8ebd-454b-ad57-9980460bc67f NVM_SYMLINK: C:\Program Files\nodejs PROCESSOR_LEVEL: 6 VS140COMNTOOLS: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\ _CONDA_EXE: I:\Anaconda3\Scripts\conda.exe CONDA_DEFAULT_ENV: base ALLUSERSPROFILE: C:\ProgramData CONDA_PYTHON_EXE: I:\Anaconda3\python.exe PROCESSOR_ARCHITECTURE: AMD64 PSModulePath: C:\Users\yrq\Documents\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules SystemDrive: C: CONDA_PREFIX: I:\Anaconda3 =ExitCode: 00000000 MAVEN_HOME: G:\maven\apache-maven-3.6.3 DIRNAME: C:\Users\yrq\Desktop\djl\ USERNAME: yrq CMD_LINE_ARGS: debugEnv ProgramFiles(x86): C:\Program Files (x86) APP_HOME: C:\Users\yrq\Desktop\djl\ PATHEXT: .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW;.CPL DriverData: C:\Windows\System32\Drivers\DriverData OneDriveConsumer: C:\Users\yrq\OneDrive _CONDA_ROOT: I:\Anaconda3 GOPATH: C:\Users\yrq\go ProgramData: C:\ProgramData ProgramW6432: C:\Program Files HOMEPATH: \Users\yrq PROCESSOR_IDENTIFIER: Intel64 Family 6 Model 165 Stepping 3, GenuineIntel HADOOP_HOME: D:\hadoop-common-2.2.0-bin-master CONDA_PROMPT_MODIFIER: (base) ProgramFiles: C:\Program Files PUBLIC: C:\Users\Public windir: C:\Windows _SKIP: 2 LOCALAPPDATA: C:\Users\yrq\AppData\Local ChocolateyLastPathUpdate: 132912998806313859 IntelliJ IDEA: G:\IntelliJ IDEA 2021.1.3\bin; NEO4J_HOME: D:\neo4j-community-3.5.4-windows USERDOMAIN: DESKTOP-PFQ9UMH CONDA_EXE: I:\Anaconda3\Scripts\conda.exe LOGONSERVER: \DESKTOP-PFQ9UMH JAVA_HOME: C:\Program Files\Java\jdk1.8.0_144 PROMPT: $P$G ERLANG_HOME: D:\erl9.2 asl.log: Destination=file WT_PROFILE_ID: {61c54bbd-c2c6-5271-96e7-009a87ff44bf} OneDrive: C:\Users\yrq\OneDrive =C:: C:\Users\yrq\Desktop\djl APPDATA: C:\Users\yrq\AppData\Roaming DOWNLOAD_URL: "https://raw.githubusercontent.com/gradle/gradle/master/gradle/wrapper/gradle-wrapper.jar" JAVA_EXE: C:\Program Files\Java\jdk1.8.0_144/bin/java.exe ChocolateyInstall: C:\ProgramData\chocolatey CONDA_SHLVL: 1 CommonProgramFiles: C:\Program Files\Common Files Path: I:\Anaconda3;I:\Anaconda3\Library\mingw-w64\bin;I:\Anaconda3\Library\usr\bin;I:\Anaconda3\Library\bin;I:\Anaconda3\Scripts;I:\Anaconda3\bin;I:\Anaconda3\condabin;C:\Python310\Scripts;C:\Python310;C:\Program Files\Java\jdk1.8.0_144\bin;C:\Program Files\Java\jdk1.8.0_144\jre\bin;I:\Anaconda3;I:\Anaconda3\Library\mingw-w64\bin;I:\Anaconda3\Library\usr\bin;I:\Anaconda3\Library\bin;I:\Anaconda3\Scripts;D:\VM PRO16\bin;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit;C:\cuda\bin;G:\Anaconda\envs\tensorflow-gpu\Scripts;C:\Users\yrq\AppData\Local\Yarn\bin;D:\Git\cmd;D:\mysql-8.0.23-winx64\bin;G:\maven\apache-maven-3.6.3\bin;G:\web\apache-tomcat-9.0.45\bin;G:\web\apache-tomcat-9.0.45\lib;C:\Program Files\Java\jdk1.8.0_144\bin;D:\mingw64\bin;D:\Git\bin;D:\mongodb\bin;D:\hadoop-common-2.2.0-bin-master\bin;D:\erl9.2\bin;C:\Users\yrq\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Users\yrq\AppData\Roaming\nvm;C:\Program Files\Go\bin;D:\download\platform-tools_r31.0.3-windows\platform-tools;D:\nodejs;C:\ProgramData\chocolatey\bin;D:\gradle-7.4.1\bin;C:\Users\yrq\AppData\Local\Programs\Python\Python39\Scripts;C:\Users\yrq\AppData\Local\Programs\Python\Python39;C:\Users\yrq\AppData\Local\Microsoft\WindowsApps;G:\PyCharm 2020.3.2\bin;G:\IntelliJ IDEA 2021.1.3\bin;D:\neo4j-community-3.5.4-windows\bin;G:\Microsoft VS Code\bin;C:\Users\yrq\go\bin;D:\download\ffmpeg-n4.4.1-2-gcc33e73618-win64-lgpl-shared-4.4\bin;C:\Users\yrq\AppData\Roaming\npm PyCharm: G:\PyCharm 2020.3.2\bin; OS: Windows_NT COMPUTERNAME: DESKTOP-PFQ9UMH PYTHONIOENCODING: UTF8 CATALINA_HOME: G:\web\apache-tomcat-9.0.45 NVM_HOME: C:\Users\yrq\AppData\Roaming\nvm PROCESSOR_REVISION: a503 CLASSPATH: C:\Users\yrq\Desktop\djl\gradle\wrapper\gradle-wrapper.jar CommonProgramW6432: C:\Program Files\Common Files ComSpec: C:\Windows\system32\cmd.exe APP_BASE_NAME: gradlew SystemRoot: C:\Windows TEMP: C:\Users\yrq\AppData\Local\Temp HOMEDRIVE: C: USERPROFILE: C:\Users\yrq TMP: C:\Users\yrq\AppData\Local\Temp WSLENV: WT_SESSION::WT_PROFILE_ID CommonProgramFiles(x86): C:\Program Files (x86)\Common Files NUMBER_OF_PROCESSORS: 12

-------------- Directories -------------- temp directory: C:\Users\yrq\AppData\Local\Temp DJL cache directory: C:\Users\yrq.djl.ai Engine cache directory: C:\Users\yrq.djl.ai

------------------ CUDA ----------------- [DEBUG] - Found cudart: I:\Anaconda3\Library\bin\cudart64_102.dll GPU Count: 1 CUDA: 102 ARCH: 61 GPU(0) memory used: 612053810 bytes

----------------- Engines --------------- DJL version: 0.17.0 Default Engine: MXNet [DEBUG] - Using cache dir: C:\Users\yrq.djl.ai\mxnet\1.9.0-cu102mkl-win-x86_64 [INFO ] - Downloading libgcc_s_seh-1.dll ... [INFO ] - Downloading libgfortran-3.dll ... [INFO ] - Downloading libopenblas.dll ... [INFO ] - Downloading libquadmath-0.dll ... [INFO ] - Downloading mxnet.dll ... [DEBUG] - Loading mxnet library from: C:\Users\yrq.djl.ai\mxnet\1.9.0-cu102mkl-win-x86_64\mxnet.dll Default Device: gpu(0) PyTorch: 2 MXNet: 0 XGBoost: 10 TensorFlow: 3

--------------- Hardware -------------- Available processors (cores): 12 Byte Order: LITTLE_ENDIAN Free memory (bytes): 406308424 Maximum memory (bytes): 7622623232 Total memory available to JVM (bytes): 491782144 Heap committed: 491782144 Heap nonCommitted: 28311552

BUILD SUCCESSFUL in 4m 49s 42 actionable tasks: 42 executed

frankfliu commented 2 years ago

@1193700079

Sorry, would you please try:

gradlew debugEnv -Dai.djl.default_engine=PyTorch
1193700079 commented 2 years ago

Found C:\Users\yrq\Desktop\djl\gradle\wrapper\gradle-wrapper.jar Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

BUILD FAILED in 11s

frankfliu commented 2 years ago

@1193700079 It seems you typed in wrong command, somehow "-Dai" got lost, try quote -D...

gradlew debugEnv "-Dai.djl.default_engine=PyTorch"
github-actions[bot] commented 2 years ago

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.