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

Enable static PGO for Linux SGX #2270

Merged
merged 6 commits into from
Jun 9, 2023

Conversation

TianlongLiang
Copy link
Contributor

Enable static PGO for Linux SGX
Update related benchmarks test scripts and readmes

execute_process(
COMMAND bash -c "sed -i -E 's/^WAMR_BUILD_STATIC_PGO = .*/WAMR_BUILD_STATIC_PGO = ${WAMR_BUILD_STATIC_PGO}/g' ${CMAKE_CURRENT_SOURCE_DIR}/enclave-sample/Makefile"
OUTPUT_VARIABLE cmdOutput
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had better handle it like WAMR_BUILD_SGX_IPFS EQUAL and WAMR_BUILD_LIB_RATS below. e.g.

if (WAMR_BUILD_STATIC_PGO EQUAL 1)
...
else ()
...
endif ()

if [ "$1" = "--sgx" ] && [ "$PLATFORM" = "linux" ]; then
IWASM="../../../product-mini/platforms/${PLATFORM}-sgx/enclave-sample/iwasm"
WAMRC="${WAMRC} -sgx"
. /opt/intel/sgxsdk/environment
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to add this line, developer may install sgxsdk in other place.

WAMRC="../../../wamr-compiler/build/wamrc"
if [ "$1" = "--sgx" ] && [ "$PLATFORM" = "linux" ]; then
IWASM="../../../product-mini/platforms/${PLATFORM}-sgx/enclave-sample/iwasm"
WAMRC="${WAMRC} -sgx"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had better

if [ "$1" = "--sgx" ]; then
    IWASM="$PWD/../../../product-mini/platforms/linux-sgx/enclave-sample/iwasm"
    WAMRC="$PWD/../../../wamr-compiler/build/wamrc -sgx"
else
    IWASM="$PWD/../../../product-mini/platforms/${PLATFORM}/build/iwasm"
    WAMRC="$PWD/../../../wamr-compiler/build/wamrc"
fi

Copy link
Contributor

@wenyongh wenyongh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wenyongh wenyongh merged commit 2f01cb7 into bytecodealliance:main Jun 9, 2023
480 checks passed
@TianlongLiang TianlongLiang deleted the dev/static_pgo_sgx branch June 16, 2023 03:25
victoryang00 pushed a commit to victoryang00/wamr-aot-gc-checkpoint-restore that referenced this pull request May 27, 2024
Enable static PGO for Linux SGX and update the related benchmarks
test scripts and documents.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants