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

Run workflow in debug and release configurations #1046

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

Conversation

vmilosevic
Copy link
Contributor

Run workflow in debug and release configurations. This will help detect assert failures in debug mode and runtime problems with release mode.

  • Add config (debug, release) to image names
  • Build with config (debug, release)
  • Remove "self-test" build from the docker image. This is no longer needed as we run docker build as a part of a workflow, and we are using newly build image for testing.

@@ -17,14 +17,17 @@ if (NOT EXISTS "${TTMLIR_TOOLCHAIN_DIR}")
message( FATAL_ERROR "The directory ${TTMLIR_TOOLCHAIN_DIR} does not exist. Please create it before running this script.\n sudo mkdir -p ${TTMLIR_TOOLCHAIN_DIR}\n sudo chown -R $ENV{USER} ${TTMLIR_TOOLCHAIN_DIR}")
endif()

if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build type" FORCE)
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, I feel like the default for env should be MinSizeRel. Most users are probably not going to need/want debug symbols in llvm.

Copy link
Contributor

Choose a reason for hiding this comment

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

@vmilosevic Maybe toolchain can remain MinSizeRel if we have dev image where its prebuilt with debug?

Copy link
Contributor

Choose a reason for hiding this comment

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

Here are LLVM suggestions:
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If I understand correctly, you want tt-mlir relese build to have LLVM build with MinSizeRel,
and tt-mlir debug build to build LLVM with debug config?

We can run CI for both debug and release, and it will make both types of images.

What should be the default config for tt-mlir, when CMAKE_BUILD_TYPE is not specified? IMHO it make sense to be debug, but we can set anything you like

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree default TT-MLIR build should be debug. What Nick wants is that even for debug TT-MLIR, LLVM toolchain to be MinSizeRel. Now my thinking was if I can pick an image where LLVM is prebuilt to be Debug, Im fine with that if not I think it should at least be RelWithDebInfo.

Copy link
Contributor

@nsmithtt nsmithtt Oct 25, 2024

Choose a reason for hiding this comment

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

So this is just the default we have in the cmake file, ie what someone gets if they manually build the env and the project. This is a separate default to what we choose to build in our docker image.

  • Docker: let's build debug as it's configured on this PR
  • Cmake default: should probably be MinSizeRel or RelWithDebInfo.

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