Hello Community,
I need help with installing the Hailo PCIe drivers and utilizing my GPU in WSL2. Despite several attempts, I have encountered various issues that I have been unable to resolve.
System Details:
- OS: Windows 11
- WSL2: Ubuntu 22.04.4 LTS (GNU/Linux 5.15.153.1-microsoft-standard-WSL2 x86_64)
- GPU: NVIDIA GeForce RTX 4090
- Docker Version: 24.0.7, build 24.0.7-0ubuntu2~22.04.1
Problems Encountered:
- Hailo PCIe Driver Installation:
- I followed the instructions to install the Hailo PCIe driver package
hailort-pcie-driver_4.18.0_all.deb
. - Encountered errors related to missing Linux headers for WSL2 kernel (
5.15.153.1-microsoft-standard-WSL2
). - Attempted to link headers manually but the driver installation script continues to fail with the error:
No rule to make target 'clean'. Stop.
Error Log:
mike@DESKTOP-GK4LOTR:/mnt/d/hailo$ sudo dpkg -i hailort-pcie-driver_4.18.0_all.deb
(Reading database ... 95306 files and directories currently installed.)
Preparing to unpack hailort-pcie-driver_4.18.0_all.deb ...
Could not test for SecureBoot, assuming SecureBoot is disabled on this machine.
Unpacking hailort-pcie-driver (4.18.0) ...
Setting up hailort-pcie-driver (4.18.0) ...
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
ybuild-essential/jammy,now 12.9ubuntu3 amd64 [installed]
Do you wish to use DKMS? [Y/n]:
Failed. Exited with status 2. See /var/log/hailort-pcie-driver.deb.log
dpkg: error processing package hailort-pcie-driver (--install):
installed hailort-pcie-driver package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
hailort-pcie-driver
Log File:
######### Wed Jul 31 21:26:42 CEST 2024 #########
/share/opt/hailo/linux/pcie /
make[1]: Entering directory '/usr/src/linux-headers-5.15.153.1-microsoft-standard-WSL2'
make[1]: *** No rule to make target 'clean'. Stop.
make[1]: Leaving directory '/usr/src/linux-headers-5.15.153.1-microsoft-standard-WSL2'
make: *** [Makefile:100: clean] Error 2
Failed. Exited with status 2. See /var/log/hailort-pcie-driver.deb.log
Failed at 40
37 }
38
39 function compile_and_install_pcie_driver_with_dkms() {
40 make clean &>> $LOG
41 make install_dkms &>> $LOG || {
42 echo "Failed to install PCIe driver to the DKMS tree. Trying to install PCIe driver without DKMS"
43 compile_and_install_pcie_driver_without_dkms
- NVIDIA GPU Issues:
- Successfully installed the NVIDIA drivers and Docker integration using
nvidia-container-toolkit
. - Verified GPU visibility with Docker using the
nvidia/cuda:11.2.2-base
image. - GPU is not being detected in Jupyter Notebook.
Steps Taken:
- Downloaded and extracted WSL2 Linux kernel headers manually.
- Linked the extracted headers to the expected location.
- Installed
nvidia-docker2
and verified GPU visibility with Docker.
Jupyter Notebook Issue:
When trying to optimize the model and test its accuracy, I received the following output indicating the absence of a GPU:
# The original images are being used, just as the input to the SDK_FP_OPTIMIZED emulator
calib_dataset = image_dataset
# For calling Optimize, use the short version: runner.optimize(calib_dataset)
# A more general approach is being used here that works also with multiple input nodes.
# The calibration dataset could also be a dictionary with the format:
# {input_layer_name_1_from_hn: layer_1_calib_dataset, input_layer_name_2_from_hn: layer_2_calib_dataset}
hn_layers = runner.get_hn_dict()["layers"]
print("Input layers are: ")
print([layer for layer in hn_layers if hn_layers[layer]["type"] == "input_layer"]) # See available input layer names
calib_dataset_dict = {"resnet_v1_18/input_layer1": calib_dataset} # In our case there is only one input layer
runner.optimize(calib_dataset_dict)
Output:
Input layers are:
['resnet_v1_18/input_layer1']
[info] Starting Model Optimization
[warning] Reducing optimization level to 0 (the accuracy won't be optimized and compression won't be used) because there's no available GPU
[warning] Running model optimization with zero level of optimization is not recommended for production use and might lead to suboptimal accuracy results
[info] Model received quantization params from the hn
[info] Starting Mixed Precision
[info] Mixed Precision is done (completion time is 00:00:00.20)
[info] Layer Norm Decomposition skipped
[info] Starting Stats Collector
[info] Using dataset with 64 entries for calibration
Calibration: 100%|█████████████████████████████████████████████████████████████████| 64/64 [00:39<00:00, 1.62entries/s]
[info] Stats Collector is done (completion time is 00:00:39.98)
[info] Starting Fix zp_comp Encoding
[info] Fix zp_comp Encoding is done (completion time is 00:00:00.00)
[info] matmul_equalization skipped
[info] Finetune encoding skipped
[info] Bias Correction skipped
[info] Adaround skipped
[info] Fine Tune skipped
[info] Layer Noise Analysis skipped
[info] Model Optimization is done
I am unable to successfully install the Hailo PCIe drivers and use the GPU in my Jupyter Notebook environment. I believe there might be underlying issues related to the Linux headers or the integration process that I might have missed.
I would greatly appreciate any guidance or troubleshooting steps you could provide to help resolve these issues.
Thank you for your support.
Best regards,
Mike