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

remove clang dep #711

Merged
merged 1 commit into from
Nov 2, 2023
Merged

remove clang dep #711

merged 1 commit into from
Nov 2, 2023

Conversation

makslevental
Copy link
Contributor

@makslevental makslevental commented Nov 2, 2023

This PR removes the dependency on clang-12 for tests and examples. I say tests and examples because there was never a real dependency (I've never built with clang-12...) because as far as I understand the dependency was only on the artifacts passed to chess rather than any compilation aie artifacts themselves.

Note this PR also drops the DCMAKE_COMPILE_WARNING_AS_ERROR because gcc will fail to compile MLIR with it on (lol).

EDIT:

Just want to be clear: this works across all platforms with all compilers currently and I don't know why this was needed (before my time). The wheels I build for us are built using gcc on Linux, clang on Mac, and MSCV on Windows:

  1. Linux: The CXX compiler identification is GNU 12.2.1;
  2. Mac: The CXX compiler identification is AppleClang 13.0.0.13000029;
  3. Windows: The CXX compiler identification is MSVC 19.29.30152.0.

Regarding the utils/ scripts: there seems to be nothing to be gained from suggesting/implying/guaranteeing clang compatibility1 and not gcc. Yes, there are some clang specific #pragmas (and gcc too) but

  1. They don't present any issues as indicated by passing tests here;
  2. They are all (including the gcc pragmas) related to boost which we will soon be rid of entirely.

cc @nirvedhmeshram

Footnotes

  1. And plenty to be lost (by signaling there's this added friction, of having clang, to using the tool).

@@ -2,17 +2,5 @@
# Copyright (C) 2022, Advanced Micro Devices, Inc. All rights reserved.
# SPDX-License-Identifier: MIT

# specify the compiler
set(CLANG_VER 12)
Copy link
Member

@keryell keryell Nov 2, 2023

Choose a reason for hiding this comment

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

Great ! This one was a pain to me about looking for such a compiler in an antique boutique. So I always had to update this file.

Copy link
Collaborator

@jsetoain jsetoain left a comment

Choose a reason for hiding this comment

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

lgtm

@jsetoain jsetoain dismissed their stale review November 2, 2023 18:55

mistake

@jsetoain jsetoain self-requested a review November 2, 2023 18:56
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "10.0")
check_cxx_compiler_flag("-Wno-unused-but-set-parameter" CXX_SUPPORTS_WNO_UNUSED_BUT_SET_PARAMETER)
append_if(CXX_SUPPORTS_WNO_UNUSED_BUT_SET_PARAMETER "-Wno-unused-but-set-parameter" CMAKE_CXX_FLAGS)
endif()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

@keryell keryell left a comment

Choose a reason for hiding this comment

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

Thanks!

@makslevental makslevental merged commit 7fa04a7 into main Nov 2, 2023
5 checks passed
@makslevental makslevental deleted the remove_clang_dep branch November 2, 2023 21:35
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