Skip to content

[XPTIFW] Enable in-tree builds #2849

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

Merged
merged 2 commits into from
Dec 15, 2020

Conversation

alexbatashev
Copy link
Contributor

No description provided.

@alexbatashev
Copy link
Contributor Author

@tovinkere @andykaylor @intel/llvm-reviewers-runtime could you please review?

@@ -63,10 +64,12 @@ def do_configure(args):
"-DCMAKE_BUILD_TYPE={}".format(args.build_type),
"-DLLVM_ENABLE_ASSERTIONS={}".format(llvm_enable_assertions),
"-DLLVM_TARGETS_TO_BUILD={}".format(llvm_targets_to_build),
"-DLLVM_EXTERNAL_PROJECTS=sycl;llvm-spirv;opencl-aot;xpti;libdevice",
"-DLLVM_EXTERNAL_PROJECTS=sycl;llvm-spirv;opencl-aot;xpti;xptifw;libdevice",
"-DLLVM_EXTERNAL_SYCL_SOURCE_DIR={}".format(sycl_dir),
"-DLLVM_EXTERNAL_LLVM_SPIRV_SOURCE_DIR={}".format(spirv_dir),
"-DLLVM_EXTERNAL_XPTI_SOURCE_DIR={}".format(xpti_dir),
Copy link
Contributor

Choose a reason for hiding this comment

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

Previous builds used "-DLLVM_EXTERNAL_XPTI_SOURCE_DIR=$SYCL_HOME/xpti" variable to enable 'xpti' in LLVM. I see two variables now "LLVM_EXTERNAL_XPTI_SOURCE_DIR" and "XPTI_SOURCE_DIR" - is there a reason the second one was added? It might affect scripts people may have already created.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

LLVM_EXTERNAL_XPTI_SOURCE_DIR tells LLVM where to find xpti external project, so that it could load it. It is required, because LLVM is a monorepo of multiple projects, and LLVM needs to somehow know where to find non-standard sub-projects. It shouldn't affect other scripts.

@@ -16,6 +16,12 @@ endif()

project (xptifw)

foreach(flag_var
Copy link
Contributor

Choose a reason for hiding this comment

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

Since my machine died, I have not been able to reproduce the Windows build failures. To be a part of LLVM builds, the Debug libraries must be of the format xxxxd.dll or they will overwrite the release version and vice-versa and they are not ABI compatible on Windows. The logic that is there in 'xpti' may be needed here to ensure that happens, especially when invoked by LLVM builds as the binaries may be placed in the same directory.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This piece of code changes static MSVC CRT to Dynamic. So, if there's a /MTd flag in command line options, it'll be replaced with /MDd. The d postfix is preserved, so, it should be fine for debug and non-debug builds.

message(FATAL_ERROR "Build step for googletest failed: ${result}")
endif()
# Only download Google Test outside of LLVM tree.
if (NOT DEFINED LLVM_EXTERNAL_XPTIFW_SOURCE_DIR)
Copy link
Contributor

Choose a reason for hiding this comment

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

This was a simple enough change :) - looks good.

Copy link
Contributor

@tovinkere tovinkere left a comment

Choose a reason for hiding this comment

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

Looks good - thanks for clarification.

@alexbatashev
Copy link
Contributor Author

@intel/llvm-reviewers-runtime friendly ping

@romanovvlad romanovvlad merged commit f6b8be4 into intel:sycl Dec 15, 2020
alexbatashev pushed a commit to alexbatashev/llvm that referenced this pull request Dec 21, 2020
* upstream/sycl: (616 commits)
  [SYCL][L0] Implement robust error handling in level_zero plugin (intel#2870)
  [SYCL][NFC] Code clean up (phase 5) revealed by self build. (intel#2907)
  [Driver][NFC] Remove unused variable (intel#2908)
  [Github Action] Enable automatic sync for main branch from llvm-project to llvm (intel#2904)
  [ESIMD][NFC] Remove unnecessary macro checks (intel#2900)
  [SYCL] Fix handling of multiple usages of composite spec constants (intel#2894)
  [SYCL] Adjust parallel-for range global size to improve group size selection (intel#2703)
  [SYCL] Add template parameter support for no_global_work_offset attribute (intel#2839)
  [SYCL] Support LLVM FP intrinsic in llvm-spirv and FE (intel#2880)
  [SYCL]Link Libm FP64 SYCL device library by default (intel#2892)
  [SYCL][NFC] Code clean up (phase 4) revealed by self build. (intel#2878)
  [SYCL][NFC] Code clean up (phase 3) revealed by self build. (intel#2865)
  [SYCL] Fix backend selection for SYCL_DEVICE_TYPE=* (intel#2890)
  [SYCL] Fix spec constants support in integration header (intel#2896)
  [Driver] Update unbundling of offload libraries to use archive type (intel#2883)
  [SYCL][NFC] Clang format SYCL.cpp (intel#2891)
  [CODEOWNERS] Add code owners for DPC++ tools (intel#2884)
  [XPTIFW] Enable in-tree builds (intel#2849)
  [SYCL] Don't dump IR and dot files by default in the LowerWGScope pass (intel#2887)
  [SYCL] Use llvm-link's only-needed option to link device libs (intel#2783)
  ...
alexbatashev added a commit that referenced this pull request Dec 22, 2020
romanovvlad pushed a commit that referenced this pull request Dec 22, 2020
@alexbatashev alexbatashev deleted the xptifw_in_tree_build branch September 17, 2021 06:46
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