Skip to content

Commit 733fa01

Browse files
committed
Add three main components
1. virtio-qcuda.c for qCUdevice 2. qcuda_driver.c for qCUdriver 3. qcu-library/libcudart.c for qCUlibrary
1 parent 6af1d2d commit 733fa01

File tree

5 files changed

+236
-372
lines changed

5 files changed

+236
-372
lines changed

README.md

+33-12
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,39 @@
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.
25

3-
In start qemu vm's command, add "device virtio-hm-pci".
6+
##System Components
47

8+
The framework of qCUDA has three components, including qCUlibrary, qCUdriver and qCUdevice; the functions of
9+
these three components are defined as follows:
510

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.
812

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.
1114

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.
1516

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

qcu-device/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx
239239
$(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@," GEN $@")
240240

241241
qemu-ga$(EXESUF): LIBS = $(LIBS_QGA)
242-
qemu-ga$(EXESUF): QEMU_CFLAGS += -I qga/qapi-generated
242+
qemu-ga$(EXESUF): QEMU_CFLAGS += -I qga/qapi-generated
243243

244244
gen-out-type = $(subst .,-,$(suffix $@))
245245

0 commit comments

Comments
 (0)