mirror of
https://github.com/clearlinux/graphene.git
synced 2026-05-13 10:33:40 +00:00
Many multi-threaded applications rely on OpenMP for efficient parallelism. Such applications link against the libgomp.so lib. Unfortunately, the native libgomp.so uses a raw SYSCALL instruction to issues futex() syscalls instead of syscall() Glibc wrapper (for performance reasons). SYSCALL instructions are executed on hot paths of OpenMP, but they are forbidden inside SGX enclaves, so Graphene traps-and-emulates them. This is very expensive, so this commit introduces an optional `make -C LibOS gcc` to build libgomp.so where SYSCALL is replaced by direct call into Graphene, similar to how we patch Glibc. See `openmp` LibOS regression manifest for example. This patched libgomp.so improves SGX performance of e.g. PyTorch: from 25% perf overhead over native to 8% on some workloads. Note that libgomp.so is built as part of GCC, and the build takes 30 min to 2 hours. That's why we make it optional and do not build in Jenkins.
10 lines
107 B
Plaintext
10 lines
107 B
Plaintext
/glibc-*.tar.gz
|
|
/glibc-*.*/
|
|
/glibc-build/
|
|
/build.log
|
|
|
|
/gcc-*.tar.gz
|
|
/gcc-*.*.*/
|
|
/gcc-build/
|
|
/gcc-build.log
|