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

Show wasm proposals status during compilation and execution #3989

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

lum1n0us
Copy link
Collaborator

During compilation:

$ cmake -S . -B build --fresh
-- The C compiler identification is GNU 11.4.0
-- The CXX compiler identification is GNU 11.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Build Configurations:
     Build as target X86_64
     CMAKE_BUILD_TYPE Release
     WAMR Interpreter enabled
     Fast interpreter enabled
     WAMR AOT enabled
     WAMR Fast JIT disabled
     WAMR LLVM ORC JIT disabled
     Libc builtin enabled
     Libc WASI enabled
     Multiple modules disabled
     Wakeup of blocking operations enabled
     GC performance profiling disabled
     Module instance context enabled
     Write linear memory base addr to x86 GS register enabled
     Quick AOT/JIT entries enabled
     AOT intrinsics enabled
------------------------------------------------------------
Phase4 Wasm Proposals:
  Always-on:
    Extended Constant Expressions
    Multi-value
    Non-trapping float-to-int conversions
    Sign-extension operators
    WebAssembly C and C++ API
  Configurable(0 is OFF. 1 is ON):
    Bulk Memory Operation: 1
    Fixed-width SIMD: 1
    Garbage collection: 0
    Legacy Exception handling: 0
    Memory64: 0
    Multiple memories: 0
    Reference Types: 1
    Reference-Typed Strings: 0
    Tail call: 0
    Thread: 0
    Typed Function References: 0
  Unsupported:
    Branch Hinting
    Custom Annotation Syntax in the Text Format
    Exception handling
    Import/Export of Mutable Globals
    JS String Builtins
    Relaxed SIMD
------------------------------------------------------------

-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Looking for mremap
-- Looking for mremap - found
-- Configuring done (0.5s)
-- Generating done (0.0s)
-- Build files have been written to: /workspaces/wasm-micro-runtime/product-mini/platforms/linux/build

During execution:

$ ./build/iwasm --version
iwasm 2.2.0
Phase4 Wasm Proposals Status:
  Always-on:
    - Extended Constant Expressions
    - Multi-value
    - Non-trapping float-to-int conversions
    - Sign-extension operators
    - WebAssembly C and C++ API
  Configurable:
    - Bulk Memory Operation: 1
    - Fixed-Width SIMD: 1
    - Garbage Collection: 0
    - Legacy Exception Handling: 0
    - Memory64: 0
    - Multiple Memory: 0

@yamt
Copy link
Collaborator

yamt commented Jan 6, 2025

i hope we had canonical names for each proposals and options.
it isn't always obvious to users how to correlate "multi-memory", "Multiple Memory", "Multiple memories", and "WASM_ENABLE_MULTI_MEMORY"/"WAMR_BUILD_MULTI_MEMORY".

my suggestion:

  • use wasm/llvm names as far as possible ("multi-memory")
  • keep build options ("WASM_ENABLE_MULTI_MEMORY"/"WAMR_BUILD_MULTI_MEMORY")
  • remove other names ("Multiple Memory", "Multiple memories")

how do you think?

@lum1n0us
Copy link
Collaborator Author

lum1n0us commented Jan 9, 2025

@yamt Let me provide an example to ensure I completely understand your feedback.

Regarding the garbage collection (GC) proposal, in the Proposals Tracking Sheet, its name is "Garbage Collection," and the corresponding compilation option is WAMR_BUILD_GC. If we change the display name to GC (to align with the compilation option name), it might become difficult to associate it with "Garbage Collection"(in the official proposal name). Therefore, the clear solution would be to rename the compilation option to WAMR_BUILD_GARBAGE_COLLECTION. Is that correct?

It may not be the most precise example since people generally recognize that GC is the abbreviation for Garbage Collection. However, it does illustrate the concept.

" Reference Types: ${WAMR_BUILD_REF_TYPES}\n"
" Reference-Typed Strings: ${WAMR_BUILD_STRINGREF}\n"
" Tail call: ${WAMR_BUILD_TAIL_CALL}\n"
" Thread: ${WAMR_BUILD_SHARED_MEMORY}\n"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
" Thread: ${WAMR_BUILD_SHARED_MEMORY}\n"
" Threads: ${WAMR_BUILD_SHARED_MEMORY}\n"

printf(" - Sign-extension operators\n");
printf(" - WebAssembly C and C++ API\n");
printf(" Configurable:\n");
printf(" - Bulk Memory Operation: %u\n", WASM_ENABLE_BULK_MEMORY);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Bulk memory operations are technically no longer in Phase4; it's a finished proposal: https://github.com/WebAssembly/proposals/blob/main/finished-proposals.md

@@ -0,0 +1,12 @@
/*
* Copyright (C) 2023 Amazon.com Inc. or its affiliates. All rights reserved.
Copy link
Collaborator

Choose a reason for hiding this comment

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

You might want to update the header.

@lum1n0us lum1n0us force-pushed the feat/wasm_proposal_details branch from 067f1b9 to 7d8710c Compare January 20, 2025 05:55
@lum1n0us
Copy link
Collaborator Author

Updated output:

$ cmake -S . -B build --fresh

-- The C compiler identification is GNU 11.4.0
-- The CXX compiler identification is GNU 11.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Build Configurations:
     Build as target X86_64
     CMAKE_BUILD_TYPE Release
     WAMR Interpreter enabled
     Fast interpreter enabled
     WAMR AOT enabled
     WAMR Fast JIT disabled
     WAMR LLVM ORC JIT disabled
     Libc builtin enabled
     Libc WASI enabled
     Multiple modules disabled
     Wakeup of blocking operations enabled
     GC performance profiling disabled
     Module instance context enabled
     Write linear memory base addr to x86 GS register enabled
     Quick AOT/JIT entries enabled
     AOT intrinsics enabled
     Shrunk memory enabled
-- About Wasm Proposals:
     Always-on:
       "Extended Constant Expressions"
       "Multi-value"
       "Non-trapping float-to-int conversions"
       "Sign-extension operators"
       "WebAssembly C and C++ API"
     Configurable. 0 is OFF. 1 is ON:
       "Bulk Memory Operation" via WAMR_BUILD_BULK_MEMORY: 1
       "Fixed-width SIMD" via WAMR_BUILD_SIMD: 1
       "Garbage collection" via WAMR_BUILD_GC: 0
       "Legacy Exception handling" via WAMR_BUILD_EXCE_HANDLING: 0
       "Memory64" via WAMR_BUILD_MEMORY64: 0
       "Multiple memories" via WAMR_BUILD_MULTI_MEMORY: 0
       "Reference Types" via WAMR_BUILD_REF_TYPES: 1
       "Reference-Typed Strings" via WAMR_BUILD_STRINGREF: 0
       "Tail call" via WAMR_BUILD_TAIL_CALL: 0
       "Threads" via WAMR_BUILD_SHARED_MEMORY: 0
       "Typed Function References" via WAMR_BUILD_GC: 0
     Unsupported (>= Phase4):
       "Branch Hinting"
       "Custom Annotation Syntax in the Text Format"
       "Exception handling"
       "Import/Export of Mutable Globals"
       "JS String Builtins"
       "Relaxed SIMD"

-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Looking for mremap
-- Looking for mremap - found
-- Configuring done (0.5s)
-- Generating done (0.0s)
-- Build files have been written to: /workspaces/wasm-micro-runtime/product-mini/platforms/linux/build

@lum1n0us
Copy link
Collaborator Author

$ ./build/iwasm --version

iwasm 2.2.0

About Wasm Proposals:
  Always-on:
    - Extended Constant Expressions
    - Multi-value
    - Non-trapping float-to-int conversions
    - Sign-extension operators
    - WebAssembly C and C++ API
  Compilation Configurable. 0 is OFF. 1 is ON:
    - Bulk Memory Operation via WASM_ENABLE_BULK_MEMORY: 1
    - Fixed-Width SIMD via WASM_ENABLE_SIMD: 1
    - Garbage Collection via WASM_ENABLE_GC: 0
    - Legacy Exception Handling via WASM_ENABLE_EXCE_HANDLING: 0
    - Memory64 via WASM_ENABLE_MEMORY64: 0
    - Multiple Memory via WASM_ENABLE_MULTI_MEMORY: 0
    - Reference Types via WASM_ENABLE_REF_TYPES: 1
    - Reference-Typed Strings via WASM_ENABLE_REF_TYPES: 1
    - Tail Call via WASM_ENABLE_TAIL_CALL: 0
    - Threads via WASM_ENABLE_SHARED_MEMORY: 0
    - Typed Function References via WASM_ENABLE_GC: 0
  Unsupported (>= Phase4):
    - Branch Hinting
    - Custom Annotation Syntax in the Text Format
    - Exception handling
    - Import/Export of Mutable Globals
    - JS String Builtins
    - Relaxed SIMD

Copy link
Collaborator

@loganek loganek left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@TianlongLiang TianlongLiang left a comment

Choose a reason for hiding this comment

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

LGTM

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.

4 participants