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

Tracking issue for demo folder #76

Closed
5 of 6 tasks
ahueck opened this issue Jun 16, 2021 · 1 comment
Closed
5 of 6 tasks

Tracking issue for demo folder #76

ahueck opened this issue Jun 16, 2021 · 1 comment
Labels
bug Something isn't working enhancement New feature or request

Comments

@ahueck
Copy link
Contributor

ahueck commented Jun 16, 2021

The TypeART demo is not properly maintained currently.

Current status

  • Makefile broken w.r.t. compiling and deprecated MPI symbols
  • CMakeLists untested/out of date?
  • Out of date scripts

Issues for release 1.6

  • Update Makefile to compile examples with TypeART
  • Remove deprecated apply script
  • Fix deprecations for OpenMPI 4 or higher

Issues (future)

  • Update CMakeLists to build examples
  • Add demo to CI system
  • Add README.md for demo explanation
@ahueck ahueck added bug Something isn't working enhancement New feature or request labels Jun 16, 2021
ahueck added a commit that referenced this issue Jun 16, 2021
@ahueck
Copy link
Contributor Author

ahueck commented Jun 18, 2021

Sections w.r.t. LLVM IR level will be removed from the main README, e.g.,

1.1.3 LLVM compiler pass - Analysis and instrumentation

The analysis pass finds all heap, stack and global allocations. An allocation data-flow filter discards all stack and
global allocations if they are not passed to a target API (default MPI calls). Subsequently, type layouts for
user-defined types (e.g., struct) of these allocations are serialized to a file and a so-called type-id number is
created for each such unique type.

The instrumentation pass adds the instrumentation callbacks to our runtime, passing 1) the memory pointer, 2) the
corresponding type-id and 3) the number of allocated elements (extent).

Example instrumentation in LLVM intermediate representation (IR)
  • C and corresponding LLVM IR code: A simple heap allocation with malloc of a double-array. It contains all
    information needed for TypeART:

    double* pointer = (double*) malloc(n * sizeof(double));
    ; Assume: %size == n * sizeof(double)
    %pointer = call i8* @malloc(i64 %size)
    %pointer_double = bitcast i8* %pointer to double*
  • Corresponding TypeART instrumentation:

    ; Assume: %size == n * sizeof(double)
    ; Heap allocation -- %pointer holds the returned pointer value:
    %pointer = call i8* @malloc(i64 %size)
    ; TypeART instrumentation -- compute the number of double-elements:
    %extent = udiv i64 %size, 8
    ; TypeART runtime callback (pointer, type-id, length) -- 6 is the type-id for double:
    call void @__typeart_alloc(i8* %pointer, i32 6, i64 %extent)
    ; Original bitcast:
    %pointer_double = bitcast i8* %pointer to double*

This was referenced Jun 18, 2021
@ahueck ahueck closed this as completed Jan 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant