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

[llvm][frontend][offloading] Move clang-linker-wrapper/OffloadWrapper.* to llvm/Frontend/Offloading #78057

Merged
merged 4 commits into from
Jan 15, 2024

Commits on Jan 13, 2024

  1. Configuration menu
    Copy the full SHA
    f56a739 View commit details
    Browse the repository at this point in the history
  2. [llvm][frontend][offloading] Move clang-linker-wrapper/OffloadWrapper…

    ….* to llvm/Frontend/Offloading
    
    This patch moves `clang/tools/clang-linker-wrapper/OffloadWrapper.*` to
    `llvm/Frontend/Offloading` allowing them to be reutilized by other projects.
    
    Additionally, it makes minor modifications to the API to make it more flexible.
    Concretely:
     - The `wrap*` methods are moved to the `OffloadWrapper` class.
     - The `OffloadWrapper` includes `Suffix` and `EmitSurfacesAndTextures` fields
    to specify some additional options.
     - The `Suffix` field is used when emitting the descriptor, registration methods,
    etc, to make them more readable. It is empty by default.
     - The `EmitSurfacesAndTextures` field controls whether to emit surface and
    texture registration code, as those functions were removed from `CUDART`
    in CUDA 12. It is true by default.
     - The `wrap*` methods now have an optional field to specify the `EntryArray`;
    this change is needed to enable JIT compilation, as ORC doesn't fully support
    `__start_` and `__stop_` symbols. Thus, to JIT the code, the `EntryArray` has
    to be constructed explicitly in the IR.
     - The function `getOffloadingEntryInitializer` was added to help create the
    `EntryArray`, as it returns the constant initializer and not a global variable.
    fabianmcg committed Jan 13, 2024
    Configuration menu
    Copy the full SHA
    fad7a36 View commit details
    Browse the repository at this point in the history

Commits on Jan 14, 2024

  1. Address comments

    fabianmcg committed Jan 14, 2024
    Configuration menu
    Copy the full SHA
    543c58c View commit details
    Browse the repository at this point in the history

Commits on Jan 15, 2024

  1. removed std::optional

    fabianmcg committed Jan 15, 2024
    Configuration menu
    Copy the full SHA
    4653bc0 View commit details
    Browse the repository at this point in the history