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

[AIE2] Enable libc++ support #142

Merged
merged 4 commits into from
Aug 29, 2024

Conversation

konstantinschwarz
Copy link
Collaborator

This PR does three things:

  1. Enable libc++ and libc++abi builds (headers-only for now)
  2. Enable libc/libc++ standard header includes in AIE clang driver
  3. Add a compatibility header to support kernels written in AIE_API

@makslevental
Copy link
Collaborator

Cool :)


// We don't ship libc/libcxx for AIE1
if (getTriple().isAIE1())
return;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this actually fail, or have you just not tried it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I haven't tried it

@@ -8,7 +8,7 @@
// (c) Copyright 2023-2024 Advanced Micro Devices, Inc. or its affiliates
//
//===----------------------------------------------------------------------===//
// RUN: %clang --target=aie2 -S -emit-llvm %s -o - | FileCheck %s
// RUN: %clang --target=aie2 -nostdlibinc -S -emit-llvm %s -o - | FileCheck %s
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm a bit concerned at having to sprinkle this everywhere. Is this just because these tests might need to run without the runtimes having been built?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes this is needed because we call the %clang driver here instead of -cc1. That expects the runtimes to be present, which we cannot rely on in clang codegen tests.
Applications will not have to set this option

@jgmelber
Copy link

Tested this using mlir-aie and a PR from @stephenneuendorffer. I verified on hardware using this passthrough kernel (after removing unnecessary includes and printfs) in this design.

For now this only "builds" the __config_site headers and installs the header-only library.
More compiler support is needed to build the library components.

This also enables more libc headers that are required by libcxx.
This matches the type in the low level intrinsic spec
…ted yet

This allows us to compile kernels using AIE_API abstractions while bringing up complete support for the intrinsic API.
@konstantinschwarz konstantinschwarz force-pushed the kschwarz.libcxx.libc.support branch from c6edd43 to 84de106 Compare August 28, 2024 18:36
@konstantinschwarz konstantinschwarz merged commit 4215875 into aie-public Aug 29, 2024
13 checks passed
@konstantinschwarz konstantinschwarz deleted the kschwarz.libcxx.libc.support branch August 29, 2024 07:03
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.

5 participants