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

Add building and testing of PGO+LTO LLVM and Julia #345

Open
wants to merge 57 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
7723d66
Add building and testing of PGO+LTO LLVM and Julia
Zentrik Mar 25, 2024
1b3e706
Fix run pgo_script command
Zentrik Mar 25, 2024
add640c
Make pgo script a bit quicker
Zentrik Mar 25, 2024
e0fcd80
Fix lto build directory
Zentrik Mar 25, 2024
4fafdc1
Fix upload name for lto binary
Zentrik Mar 25, 2024
8dec66b
Use profile from building julia for PGO
Zentrik Mar 26, 2024
04bc679
Replace + with - character in .arches file
Zentrik Mar 26, 2024
4a944cd
Add -m64 as a flag to clang
Zentrik Mar 26, 2024
c24698b
Print patchelf config log if make fails
Zentrik Mar 26, 2024
cc7a072
Fix typo
Zentrik Mar 26, 2024
657bdf7
Try finding correct gcc - taken from CLANGSA_CXXFLAGS in julia Makefile
Zentrik Mar 26, 2024
f907ba9
Specify gcc version exactly
Zentrik Mar 26, 2024
682b02e
Try different path
Zentrik Mar 26, 2024
657b390
Try different path + pass into flags used for building not just config
Zentrik Mar 26, 2024
3c409ba
Specify CFLAGS and CXXFLAGS properly
Zentrik Mar 26, 2024
f7fcaf1
Remove hardcoded gcc install dir
Zentrik Mar 26, 2024
aaf61c7
Upload profile data so builds can be reproduced
Zentrik Mar 27, 2024
3a22736
Switch rootfs image to llvm_passes
Zentrik Mar 29, 2024
0b7d70e
Add back gcc install dir for sanitize opts
Zentrik Mar 29, 2024
45c520c
Add back gc install dir everywhere
Zentrik Mar 29, 2024
7e2256b
Update rootfs_hash
Zentrik Mar 29, 2024
2fe728a
Stop clang throwing error on unused function in crc32
Zentrik Mar 29, 2024
75e32b8
Fix
Zentrik Mar 29, 2024
1d142de
Revert "Fix"
Zentrik Mar 29, 2024
83c8607
Revert "Stop clang throwing error on unused function in crc32"
Zentrik Mar 29, 2024
07fa39e
Remove `-Werror` till https://github.com/JuliaLang/julia/pull/53897 m…
Zentrik Apr 21, 2024
3703bd8
Clean up
Zentrik Apr 21, 2024
60baf58
Try to fix downloading pgo binary when testing
Zentrik Apr 21, 2024
4f1c0c8
Add comment
Zentrik Jul 13, 2024
13d9447
Tabs to spaces
Zentrik Jul 13, 2024
c669dba
Copy cleanup from https://github.com/JuliaCI/julia-buildkite/pull/345…
Zentrik Aug 22, 2024
0408a2f
Workaround parser disliking +
Zentrik Aug 22, 2024
eda42b7
Fix triplet extraction
Zentrik Aug 22, 2024
5f6fe68
Include make flags from .arches for stage 1
Zentrik Aug 22, 2024
2d1ba85
Hack in LDFLAGS
Zentrik Aug 22, 2024
81196b0
Be more targeted with LDFLAGS
Zentrik Aug 22, 2024
62cebaf
Try to prevent `binary-dist` from rebuilding sysimg.ji
Zentrik Aug 23, 2024
eaabb50
Try again
Zentrik Aug 24, 2024
05efb04
Try again
Zentrik Aug 24, 2024
df41626
Try again
Zentrik Aug 24, 2024
63b21a3
Try again
Zentrik Aug 24, 2024
214bb07
Try again
Zentrik Aug 24, 2024
0de5f46
Test fix
Zentrik Aug 24, 2024
4b7099c
Try again
Zentrik Aug 24, 2024
aa3e34c
Fix again
Zentrik Aug 24, 2024
ea9a02f
Retrigger
Zentrik Aug 24, 2024
482f04a
Try again
Zentrik Aug 24, 2024
d165dc5
Try again
Zentrik Aug 24, 2024
6595ba2
Fix again
Zentrik Aug 24, 2024
8dc52bd
Fix up
Zentrik Aug 24, 2024
b4a1a2f
Rebuild
Zentrik Aug 25, 2024
faa645d
Switch back to official Julia Repo
Zentrik Sep 9, 2024
a6d823d
Try fix for lld not being installed into usr/tools
Zentrik Sep 10, 2024
a51739b
Hopefully correct fix
Zentrik Sep 10, 2024
173d95e
Retrigger
Zentrik Sep 10, 2024
399ae7e
Switch back to Julia repo
Zentrik Sep 11, 2024
acca367
Merge branch 'main' into main
DilumAluthge Sep 20, 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
11 changes: 11 additions & 0 deletions pipelines/main/launch_unsigned_jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ steps:
bash .buildkite/utilities/arches_pipeline_upload.sh \
.buildkite/pipelines/main/platforms/build_linux.arches \
.buildkite/pipelines/main/platforms/build_linux.yml
# Launch Linux PGO+LTO build jobs
GROUP="Build" \
Zentrik marked this conversation as resolved.
Show resolved Hide resolved
ALLOW_FAIL="false" \
bash .buildkite/utilities/arches_pipeline_upload.sh \
.buildkite/pipelines/main/platforms/build_linux.pgo_lto.arches \
.buildkite/pipelines/main/platforms/build_linux.yml
# Launch macOS packaging jobs
GROUP="Build" \
ALLOW_FAIL="false" \
Expand Down Expand Up @@ -97,6 +103,11 @@ steps:
bash .buildkite/utilities/arches_pipeline_upload.sh \
.buildkite/pipelines/main/platforms/test_linux.i686.arches \
.buildkite/pipelines/main/platforms/test_linux.i686.yml
# Launch Linux PGO+LTO test jobs
GROUP="Test" \
bash .buildkite/utilities/arches_pipeline_upload.sh \
.buildkite/pipelines/main/platforms/test_linux.pgo_lto.arches \
.buildkite/pipelines/main/platforms/test_linux.yml
# Launch macOS test jobs
GROUP="Test" \
bash .buildkite/utilities/arches_pipeline_upload.sh \
Expand Down
8 changes: 8 additions & 0 deletions pipelines/main/platforms/build_linux.pgo_lto.arches
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# ROOTFS_IMAGE_NAME TRIPLET ARCH ARCH_ROOTFS USE_JULIA_PGO_LTO MAKE_FLAGS TIMEOUT ROOTFS_TAG ROOTFS_HASH
llvm_passes x86_64-linux-gnu-pgo-lto x86_64 x86_64 PGO_LTO . . v7.6 ebdfa2d40c0e27842cccbfdd43710144f9adf9d8

# These special lines allow us to embed default values for the columns above.
# Any column without a default mapping here will simplpy substitute a `.` to the empty string

# Builds should generally finish in much less time than this, but from-source builds can take longer
#default TIMEOUT 80
1 change: 1 addition & 0 deletions pipelines/main/platforms/build_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ steps:
TRIPLET: "${TRIPLET?}"
MAKE_FLAGS: "${MAKE_FLAGS?}"
ROOTFS_IMAGE_NAME: "${ROOTFS_IMAGE_NAME?}"
USE_JULIA_PGO_LTO: "${USE_JULIA_PGO_LTO}"
10 changes: 10 additions & 0 deletions pipelines/main/platforms/test_linux.pgo_lto.arches
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# ROOTFS_IMAGE_NAME TRIPLET ARCH ARCH_ROOTFS TIMEOUT USE_RR USE_JULIA_PGO_LTO ROOTFS_TAG ROOTFS_HASH
tester_linux x86_64-linux-gnu-pgo-lto x86_64 x86_64 . . PGO_LTO v6.00 770c0240be788cfeb9654e1980ea929d3ed98d1f

# These special lines allow us to embed default values for the columns above.
# Any column without a default mapping here will simply substitute a `.` to the empty string

# Most tests should finish within ~45 minutes, barring exceptionally slow hardware
# We double that to a default of 90 minutes, with an extra 45 minutes for cleanup,
# including things like `rr` trace compression,
#default TIMEOUT 135
10 changes: 10 additions & 0 deletions utilities/build_julia.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ echo "--- Collect make options"
# These are the flags we'll provide to `make`
MFLAGS=()

if [[ ! -z "${USE_JULIA_PGO_LTO-}" ]]; then
MFLAGS+=( "-Ccontrib/pgo-lto" )
MFLAGS+=( "STAGE2_BUILD=$PWD" )
fi

# If we have the option, let's use `--output-sync`
if ${MAKE} --help | grep output-sync >/dev/null 2>/dev/null; then
MFLAGS+=( "--output-sync" )
Expand Down Expand Up @@ -96,3 +101,8 @@ fi

echo "--- Upload build artifacts to buildkite"
buildkite-agent artifact upload "${UPLOAD_FILENAME}.tar.gz"

# Upload the profile data to allow for reproducible builds
if [[ ! -z "${USE_JULIA_PGO_LTO-}" ]]; then
buildkite-agent artifact upload "contrib/pgo-lto/profiles/merged.prof"
fi
3 changes: 3 additions & 0 deletions utilities/extract_triplet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ case "${TRIPLET}" in
*-gnunogpl) # builds that use `USE_GPL_LIBS=0`
OS="linuxnogpl"
;;
*-gnu-pgo-lto) # PGO + LTO builds
OS="linuxpgolto"
;;
*-musl)
OS="musl"
;;
Expand Down