Go to file
Aries d87e74014d Update README 2022-12-29 09:56:50 +08:00
.github [NFC] Fix exception in version-check.py script 2022-09-15 13:34:29 +02:00
bolt [DebugInfo] llvm::Optional => std::optional 2022-12-05 00:09:22 +00:00
clang Add OpenCL addressing space to target addressing space mapping 2022-12-20 14:49:50 +08:00
clang-tools-extra Remove unused #include "llvm/ADT/Optional.h" 2022-12-05 06:31:11 +00:00
cmake [cmake] Add missing CMakePushCheckState include to FindLibEdit.cmake 2022-11-07 18:20:19 +01:00
compiler-rt Make -fsanitize=scudo use scudo_standalone. Delete check-scudo. 2022-12-02 11:29:41 -08:00
cross-project-tests [dexter-tests] Add attribute optnone to main function 2022-10-26 20:57:49 +00:00
flang Remove unused #include "llvm/ADT/Optional.h" 2022-12-05 06:31:11 +00:00
libc [libc][Obvious] Update error bounds for uint_test.QuickMulHiTests. 2022-12-02 18:13:35 -05:00
libclc Drafting divergent related code, not working yet. 2022-12-19 18:11:34 +08:00
libcxx [libc++][NFC] Fix typo in comment 2022-12-02 12:20:27 -08:00
libcxxabi [libc++abi][LIT][AIX] Use Vector instructions available on Power7 in vec_reg_restore.pass.cpp 2022-11-29 14:08:03 -05:00
libunwind [CMake] Use LLVM_TARGET_TRIPLE in runtimes 2022-11-29 04:08:24 +00:00
lld Remove unused #include "llvm/ADT/Optional.h" 2022-12-05 06:31:11 +00:00
lldb Remove unused #include "llvm/ADT/Optional.h" 2022-12-05 06:31:11 +00:00
llvm Add pattern for float point ternary operation and add test cases 2022-12-28 17:57:24 +08:00
llvm-libgcc [cmake] Slight fix ups to make robust to the full range of GNUInstallDirs 2022-07-26 14:48:49 +00:00
mlir [mlir] Use std::nullopt instead of None in comments (NFC) 2022-12-04 19:58:32 -08:00
openmp [OpenMP][libomptarget] Add hasQueue() function in NextGen plugin's AsyncInfoWrapperTy 2022-12-04 13:24:40 +01:00
polly Remove unused #include "llvm/ADT/Optional.h" 2022-12-05 06:31:11 +00:00
pstl Revert "[cmake] Use `CMAKE_INSTALL_LIBDIR` too" 2022-08-18 22:46:32 -04:00
runtimes [runtimes] Fix runtimes-test-depends 2022-11-30 16:55:51 -08:00
third-party [llvm] [cmake] Set EXCLUDE_FROM_ALL on gtest and TestingSupport 2022-11-24 17:52:22 +01:00
utils [bazel] Add a missing dependency after 786cbb09ed 2022-12-02 16:56:05 +01:00
.arcconfig
.arclint
.clang-format
.clang-tidy Add -misc-const-correctness to .clang-tidy 2022-08-08 13:00:52 -07:00
.git-blame-ignore-revs Add __config formatting to .git-blame-ignore-revs 2022-06-14 09:52:49 -04:00
.gitignore gitignore install folder 2022-12-07 09:07:45 +08:00
.mailmap .mailmap: add entry for myself 2022-12-03 09:52:57 +01:00
CONTRIBUTING.md docs: update some bug tracker references (NFC) 2022-01-10 15:59:08 -08:00
LICENSE.TXT [docs] Add LICENSE.txt to the root of the mono-repo 2022-08-24 09:35:00 +02:00
README-LLVM.md Update README 2022-12-29 09:56:50 +08:00
README.md Update README 2022-12-29 09:56:50 +08:00
SECURITY.md [docs] Describe reporting security issues on the chromium tracker. 2021-05-19 15:21:50 -07:00

README.md

This is the Ventus GPGPU port of LLVM Compiler Infrastructure

Ventus GPGPU is based on RISCV RV32IMAZfinxZve32f ISA with fully redefinition the concept of V-extension.

For more architecture detail, please refer to Ventus GPGPU Arch

Getting Started

Build the toolchain

git clone https://github.com/THU-DSP-LAB/llvm-project.git
cd llvm-project
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DLLVM_ENABLE_PROJECTS="clang;lld;libclc" -DLLVM_TARGETS_TO_BUILD="RISCV" -DCMAKE_INSTALL_PREFIX=../install -G Ninja ../llvm

Compile a OpenCL C program into Ventus GPGPU assembly

vector_add.cl:

__kernel void vectorAdd(__global float* A, __global float* B) {
  unsigned tid = get_global_id(0);
  A[tid] += B[tid];
}
clang -cl-std=CL2.0 -target riscv32 -mcpu=ventus-gpgpu  -O1 -S vector_add.cl -o vector_add.s