Contents tagged with Hardware
-
Setup and use CUDA and TensorFlow in Windows Subsystem for Linux 2
Table of contents
- Install Windows preview
- Install WSL 2 preview
- Install Nvidia driver preview and CUDA toolkit
- Run CUDA sample application
- Install Docker and Nvidia container toolkit
- Run CUDA containers
- Troubleshoot
- Run WSL + CUDA + Docker + Jupyter + TensorFlow
- Encoding and decoding video with GPU in WSL?
GPU support is the most requested feature in Windows Subsystem for Linux (WSL). It is available in WSL 2.0 through Windows Insiders program. And Nvidia CUDA is supported. The following diagram shows the WDDM model supporting CUDA user mode driver running inside Linux guest:
So the popular Linux AI frameworks like TensorFlow, PyTorch, etc. can work with WSL with CUDA acceleration:
This article walks through the installation of Windows, WSL, CUDA in WSL, and Docker in WSL.
Install Windows preview
First, you must enable “Optional diagnostic data”, otherwise Windows cannot join Windows Insiders.
Then, join Windows Insiders program with Microsoft account (an account can be created if you don’t have one: https://insider.windows.com/). The channel must be Dev:
Then run Windows Update. It will download the pre=release installer. Windows will restart and reinstall.
Install WSL 2 preview
In Windows, make sure the following Windows features are enabled:
- WSL:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart - Virtual machine platform:
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Now restart Windows, then Windows will have WSL and the wsl command line tool. Run Windows Update again to get the latest WSL 2. When this is done, in the update history, it must show 4.19.121 or later:
Then manually install this patch: https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi. And then run the following command as administrator to update the kernel to the latest version:
C:\WINDOWS\system32>wsl --update
Checking for updates...
Downloading updates...
Installing updates...
This change will take effect on the next full restart of WSL. To force a restart, please run 'wsl --shutdown'.
Kernel version: 5.4.72 -
Installing Android 9 Pie with Microsoft apps on Nexus 7
Years ago I blogged about installing Android 6 on my old Nexus 7 tablet. Now Android 9 is there. This post shows how to install latest Android 9 with latest Microsoft apps.
-
Installing Android 6 Marshmallow on Nexus 7
I got a Nexus 7 in 2013. In 2014 it was upgraded to Android 5.0 Lollipop, and then became way slower. This month, Google released Android 6.0.0 factory images - build MRA58K, Nexus 7 2013 included. So maybe it is time to refresh the device.
Here are the steps of installing from Windows 10:
-
Playing with the CPU Usage Curve
In the book “The Beauty Of Programming”, which talks about Microsoft interview questions, there is a interesting section: Control the CPU curve of Windows Task Manager.
-
Resolving The nvlddmkm.sys Blue Screen Issue
I started to use ATI discrete graphic cards since 2002. At the end of 2009, I got my first pair of NVIDIA cards, GTX260M SLI , and recently I after I upgraded the driver to the latest 195 release, I encountered the blue screen failure on my laptop with Windows 7.
-
Mac OSX Turns Dual Core Laptop into Solo Core
This is blogged because it is surprising. Some months ago my friend and me were investigating Mac OSX for my WebOS, so we installed the latest version on a machine, SAMSUNG R25 XE04 with a T2330 Dual Core CPU. After that, Windows 7 was installed back. However, Windows recognized his laptop as a Solo Core CPU.
-
Confirmed by Microsoft: Cannot Install HD Audio Driver On Windows Server 2003 SP2 / R2
On Winodws Server 2003 SP2 / R2, HD (High Definition) audio driver cannot be installed. This happens for both 32 bit and 64 bit versions of Windows.