Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LLVM OpenMP runtime #109

Open
wants to merge 117 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
cb36d27
[software] Add kmp and move omp to gomp
sant0s12 Mar 26, 2024
347246a
[software] Call real main only from core 0
sant0s12 Mar 26, 2024
ec539ae
[software] Use lld when compiling with clang (fixes linking C++)
sant0s12 Mar 26, 2024
d8f9563
[software] Implement basic barrier after parallel block
sant0s12 Apr 2, 2024
53f1dc6
[software] Put sbss in l2
sant0s12 Apr 3, 2024
ff00eb6
[software] Disable C++ exceptions and set std to c++20
sant0s12 Apr 3, 2024
9496ca8
[software] Use simple l1 allocator for C++ heap
sant0s12 Apr 3, 2024
3d28c6b
[software] Restructure
sant0s12 Apr 4, 2024
a415c79
[software] Add clangd config
sant0s12 Apr 9, 2024
f269d31
[software] Switch main wrapper to cpp
sant0s12 Apr 9, 2024
75d3019
[software] Add ETL
sant0s12 Apr 13, 2024
6dc0ddf
[software] Init globals
sant0s12 Apr 13, 2024
eca417c
[software] Redo barrier
sant0s12 Apr 13, 2024
02ebe9d
[software] Restructure running tasks
sant0s12 Apr 13, 2024
589d960
[software] Implement mutex
sant0s12 Apr 14, 2024
8590b97
[software] Fix barrier
sant0s12 Apr 14, 2024
762f2b5
[software] Port barrier_test1 to kmp
sant0s12 Apr 14, 2024
fc443fa
[software] Restructure
sant0s12 Apr 14, 2024
262129f
[software] Add reference counting to barrier and use std::atomic
sant0s12 Apr 14, 2024
5ee5337
[software] Add support for omp_get_num_threads and omp_get_thread_num
sant0s12 Apr 14, 2024
4906596
[software] Port omp_parallel_test and barrier_test_2
sant0s12 Apr 14, 2024
393754b
[software] Disable stdlib
sant0s12 Apr 15, 2024
5f4d39c
[software] Use std::atomic in main_wrapper
sant0s12 Apr 15, 2024
d2039dd
[software] Implement getCurrentThread
sant0s12 Apr 15, 2024
7fee82b
[software] Add support for assert()
sant0s12 Apr 16, 2024
1191ce4
[software] ETL follow NDEBUG and suppress library warnings
sant0s12 Apr 16, 2024
17a6b25
[software] Implement static for loops
sant0s12 Apr 19, 2024
7cc9fdc
[software] Port omp_parallel_for test
sant0s12 Apr 19, 2024
32efe63
[software] Lock allocator since it's not thread safe
sant0s12 Apr 20, 2024
8b8694c
[software] Implement shared pointer
sant0s12 Apr 20, 2024
4d05fe1
[software] Switch barrier to shared pointer
sant0s12 Apr 20, 2024
158e003
[software] Add teams
sant0s12 Apr 21, 2024
05d32a4
[software] Implement dynamic worksharing
sant0s12 Apr 21, 2024
973794d
[software] Port parallel for benchmark
sant0s12 Apr 22, 2024
0be5a78
[software] Include <memory> to build verilator on new clang
sant0s12 Apr 22, 2024
96abc74
[software] Add stack tracing to tracevis
sant0s12 Apr 27, 2024
d940c07
[software] Print PC on stack overflow detection
sant0s12 Apr 27, 2024
e31c56b
[software] Remove debug printing and update gen_trace
sant0s12 Apr 27, 2024
cb32d65
[software] Warn on large stack usage
sant0s12 Apr 27, 2024
fd509bd
[software] Tweak tracing Makefile
sant0s12 Apr 27, 2024
12252d8
[software] Put microtask on the heap, debug print and inlining
sant0s12 Apr 27, 2024
58a9bcd
[software] Implement master, single and reduction
sant0s12 Apr 28, 2024
432a2ab
[software] Remove barrier_test2
sant0s12 Apr 28, 2024
44faf07
[software] Automate benchmarks
sant0s12 May 5, 2024
fd320fa
[software] Heap allocate task args
sant0s12 May 11, 2024
69b3f7e
[software] Add .clang-tidy
sant0s12 May 11, 2024
6405a6b
[software] Save figures to folder based on git commit
sant0s12 May 11, 2024
b226f4e
[software] Don't format external dependencies
sant0s12 May 11, 2024
53c52eb
[software] Fix tracevis cycles
sant0s12 May 11, 2024
34c20da
[software] Remove wfi from main wrapper
sant0s12 May 11, 2024
e0e5199
[software] Implement intitial performance optimizations
sant0s12 May 11, 2024
10c212b
[software] Specify dwarf version
sant0s12 May 11, 2024
813cd52
[software] Fix formatting and add some barrier debugging
sant0s12 May 11, 2024
3ce6698
[software] Add minpool config with no xpulp extensions
sant0s12 May 11, 2024
5fecba5
[software] Improve barrier performance
sant0s12 May 11, 2024
070ada7
[software] Move benchmarking scripts
sant0s12 May 11, 2024
2f07136
[software] Implement automated testing
sant0s12 May 12, 2024
db885e6
[software] Fix barrier test failing
sant0s12 May 14, 2024
bf1503c
[software] Add banshee config
sant0s12 May 15, 2024
c03ce4a
[software] Add banshee target
sant0s12 May 15, 2024
ebad7da
[software] Fix atomic test failing
sant0s12 May 17, 2024
e1f1cab
[software] Use testing framework in atomic test
sant0s12 May 17, 2024
75c4c14
[software] Update .clang-tidy
sant0s12 May 17, 2024
8ba2635
[software] Update critical test
sant0s12 May 17, 2024
3e7fbb9
[software] Update master test
sant0s12 May 17, 2024
92c9604
[software] Add neq and print failure location
sant0s12 May 18, 2024
8774ceb
[software] Try to optimise team creation
sant0s12 May 20, 2024
2f2c566
[software] Handle error 117
sant0s12 May 21, 2024
e26f110
[software] Fix dynamic schedule invalidation for default team
sant0s12 May 21, 2024
dbecab3
[software] Fix barrier race contidion on banshee
sant0s12 May 21, 2024
05ff6f6
[software] Fix dynamic for loop and other optimizations
sant0s12 May 21, 2024
4b32bb5
[software] Update scripts
sant0s12 May 21, 2024
dc0b40c
[software] Fix clang warnings
sant0s12 May 26, 2024
7e46d6c
[software] Update .clangd and .clang-tidy
sant0s12 May 26, 2024
5467e1b
[software] Fix init array
sant0s12 May 26, 2024
29a7eed
[software] Invalidate schedule only when all threads are done
sant0s12 May 26, 2024
c0fd9c5
[software] Fix formatting
sant0s12 May 26, 2024
c77a242
[software] Update omp benchmarks
sant0s12 May 26, 2024
2b35f55
[changelog] Update changelog
sant0s12 May 26, 2024
e3dec88
[software] Move tests and apps to gomp and set default compiler
sant0s12 May 27, 2024
87c5501
[config] Fix minpool-no-xpulp config
sant0s12 May 28, 2024
73815a3
[software] Fix RISCV_ARCH
sant0s12 May 29, 2024
d8481b2
[software] Avoid microtask args allocation
sant0s12 May 30, 2024
1a012e4
[software] Add initial teams support
sant0s12 May 30, 2024
ab0b45d
[software] Add num_teams, thread_limit and distribute
sant0s12 Jun 1, 2024
a350536
[software] Fix kmp tests failing on RTL
sant0s12 Jun 11, 2024
9af2367
[software] Remove output file
sant0s12 Jun 11, 2024
a272a8b
[software] Add test repetition option
sant0s12 Jun 11, 2024
e9802b0
[software] Format python scripts
sant0s12 Jun 11, 2024
6894519
[software] Add license headers
sant0s12 Jun 11, 2024
2aee4a5
[software] Join kmp and gomp apps and tests
sant0s12 Jun 13, 2024
15f4570
[software] Remove frame size warning
sant0s12 Jun 13, 2024
31ab3db
[software] Fix warnings
sant0s12 Jun 13, 2024
589c861
[software] Fix formatting
sant0s12 Jun 13, 2024
7553a40
[software] Re-add data.h
sant0s12 Jun 13, 2024
41ccc3c
[software] Re-add -lgcc
sant0s12 Jun 13, 2024
4f6650a
[software] Fix parallel for private test
sant0s12 Jun 13, 2024
36c060e
[software] Jump to _eoc on abort
sant0s12 Jun 13, 2024
22b13ee
[software] Simplify omp dynamic schedule
sant0s12 Jun 13, 2024
2fbe8eb
[software] Update benchmarking scripts
sant0s12 Jun 13, 2024
2da7935
[software] Fix warnings
sant0s12 Jun 13, 2024
164fd09
[software] Only put COMMON in L1
sant0s12 Jun 16, 2024
1491897
[software] Fix teams
sant0s12 Jun 16, 2024
acc9265
[software] Move benchmark and testing scripts
sant0s12 Jun 16, 2024
262054f
[software] Add sections test
sant0s12 Jun 16, 2024
db383a7
[software] Remove etl since it is not used
sant0s12 Jun 21, 2024
26746e1
[software] Fix deadlock when deleting team
sant0s12 Jun 22, 2024
7d8bc21
[software] Use getThread(gtid)
sant0s12 Jun 22, 2024
1243194
[software] Fix runner.py and linting
sant0s12 Jun 22, 2024
2732157
[software] Put globals with locks in L1 also for gomp
sant0s12 Jun 27, 2024
0bd9344
[software] Move copyPrivate and implement minor performance tweaks
sant0s12 Jun 27, 2024
2a188b0
[software] Update runner.py to always return output
sant0s12 Jul 1, 2024
cf9ee77
[software] Fix tracevis
sant0s12 Jul 1, 2024
8c50cf2
[software] Fix lint
sant0s12 Jul 1, 2024
940d43c
[software] Put entire bss in L1, fixes riscv-tests
sant0s12 Jul 1, 2024
adade21
[software] Fix warnings
sant0s12 Jul 1, 2024
7321549
[changelog] Update changelog
sant0s12 Jul 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[software] Use simple l1 allocator for C++ heap
  • Loading branch information
sant0s12 committed May 26, 2024
commit 9496ca8c84e64599445c7be30da2be44b83d26d3
15 changes: 15 additions & 0 deletions software/runtime/kmp/cppsupport.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#include "printf.h"
#include <cstdlib>
#include <stdint.h>

extern "C" {
#include "alloc.h"
}

void *operator new(size_t size) {
return simple_malloc(size);
}

void operator delete(void *p) noexcept {
return simple_free(p);
}
6 changes: 5 additions & 1 deletion software/runtime/kmp/main_wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ int __wrap_main() {
if (core_id == 0) {
printf("Running OpenMP program on %d cores\n", mempool_get_core_count());

int res = __real_main();
// Init heap allocators
mempool_init(0);

// Run the program
__real_main();

// Go to sleep since progam is done
mempool_wfi();
Expand Down