|
1 |
| -# qCUDA |
| 1 | +##qCUDA |
| 2 | +qCUDA is based on the virtio framework to provide the para-virtualized driver as “front-end”, |
| 3 | +and the device module as “back-end” for performing the interaction with API remoting and memory management. |
| 4 | +In our test environment, qCUDA can achieve above 95% of the bandwidth efficiency for most results by comparing with the native. In addition, by comparing with prior work, qCUDA has more flexibility and interposition that it can execute CUDA-compatible programs in the Linux and Windows VMs, respectively, on QEMU-KVM hypervisor for GPGPU virtualization. |
2 | 5 |
|
3 |
| -In start qemu vm's command, add "device virtio-hm-pci". |
| 6 | +##System Components |
4 | 7 |
|
| 8 | +The framework of qCUDA has three components, including qCUlibrary, qCUdriver and qCUdevice; the functions of |
| 9 | +these three components are defined as follows: |
5 | 10 |
|
6 |
| -qcu-device: |
7 |
| - QEMU Hypervisior with virtio device. Using in host. |
| 11 | +* qCUlibrary (`qcu-library`) – The interposer library in VM (guest OS) provided CUDA runtime access, interface of memory allocation, qCUDA command (qCUcmd), and passing the qCUcmd to the qCUdriver. |
8 | 12 |
|
9 |
| -qcu-driver: |
10 |
| - virtio device driver. Using in guest. |
| 13 | +* qCUdriver (`qcu-driver`) – The front-end driver was responsible for the memory management, data movement, analyzing the qCUcmd from the qCUlibrary, and passing the qCUcmd by the control channel which is connected to the qCUdevice. |
11 | 14 |
|
12 |
| -qcu-library: |
13 |
| - cuda API. Using in guest. |
14 |
| - Note: before using this library, you should add "--enable-cuda" when compiler hypervisior. At Host side, it is using nvidia official driver. |
| 15 | +* qCUdevice (`qcu-device`) – The virtual device as the back-end was responsible for receiving/sending the qCUcmd through the control channel; it depended on receiving the qCUcmd to active related operations in the host, including to register GPU binary, convert guest physical addresses (GPA) into host virtual addresses (HVA), and handle the CUDA runtime/driver APIs for accessing the GPU. |
15 | 16 |
|
16 |
| -test: |
17 |
| - sample code for write, read and cuda. |
18 |
| - |
| 17 | +##Installation |
| 18 | +###Prerequisites |
| 19 | +* CUDA 7.5 |
| 20 | +* Ubuntu 14.04.3 LTS (GNU/Linux 3.19.0-25-generic x86_64) |
| 21 | +* Ubuntu 14.04 image (guest OS) |
| 22 | +* Windows 8 image (guest OS) |
| 23 | + |
| 24 | +###How to install |
| 25 | +* qcu-device was modified from QEMU 2.4.0, under this forder add the "--enable-cuda option" in the configure: |
| 26 | +./configure --enable-cuda and then follow the installation steps of QEMU. |
| 27 | + |
| 28 | +* Download qcu-driver and qcu-library in guest OS. |
| 29 | +* Enter qcu-driver and execute the commands: |
| 30 | + * make all |
| 31 | + * make i |
| 32 | +* Enter qcu-library and execute the commands: |
| 33 | + * make all |
| 34 | + * make install |
| 35 | + |
| 36 | +## Contributors |
| 37 | +* Yu-Shiang Lin |
| 38 | +* Luis Herrera |
| 39 | +* Jia-Chi Chen |
0 commit comments