-
Notifications
You must be signed in to change notification settings - Fork 61
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
WIP: Feature/probinso/hipcc support #596
Open
robinson96
wants to merge
70
commits into
develop
Choose a base branch
from
feature/probinso/hipcc_support
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
70 commits
Select commit
Hold shift + click to select a range
7563ed8
recursive and regex
chapman39 0518043
gitignore workspace
chapman39 efb0907
desc
chapman39 19311d8
regex for properties
chapman39 0ce11e4
remove duplicates of entire tree
chapman39 6b79fce
remove enter
chapman39 ed3eae6
lowercase a
chapman39 8c938db
Merge remote-tracking branch 'origin/develop' into feature/chapman39/…
chapman39 44bdd7a
Update cmake/BLTMacros.cmake
chapman39 6a37c24
if regex undefined, don't use MATCHES
chapman39 c7fe954
tlist doesn't need a particular name
chapman39 9c3c6d2
Merge branch 'develop' into feature/chapman39/print_target_properties…
chapman39 56b745d
docs and simpler print
chapman39 76b7512
Merge branch 'feature/chapman39/print_target_properties_recursive' of…
chapman39 f6b9ac5
adding tioga
chapman39 4620b70
Merge branch 'develop' into feature/chapman39/replace_corona_with_tioga
chapman39 e86f979
remove corona and add tioga to ci
chapman39 fd157dd
Merge branch 'feature/chapman39/replace_corona_with_tioga' of github.…
chapman39 9d977f5
no --test-serial
chapman39 b6cb3a4
fix errors
chapman39 0e79e46
no build_on_tioga
chapman39 e950724
typo
chapman39 f697144
patch from ALE3D
robinson96 1e96e23
cleanup
robinson96 8cbd0d3
using flux
chapman39 7f57b0f
update flux cmds
chapman39 4141f19
fixed host-config path
chapman39 7b3b13d
Merge pull request #595 from LLNL/feature/chapman39/replace_corona_wi…
chapman39 6ae5448
Merge branch 'develop' into feature/chapman39/print_target_properties…
chapman39 3d08ef3
PROPERTY_VALUE_REGEX, prints blt_reg depends_on
chapman39 62261a0
typo
chapman39 0fcafac
updated docs, added examples, fixed bugs
chapman39 78ef818
Merge branch 'feature/chapman39/print_target_properties_recursive' of…
chapman39 d3c40a1
rename recursive function
chapman39 f314801
infinite loop edge case fix
chapman39 fd80b90
explain new print options
chapman39 376099c
apostrophe
chapman39 d808991
code style
chapman39 e31b6de
wording
chapman39 1f0463a
new macos imagename
chapman39 401f967
Update RELEASE-NOTES.md
chapman39 1bfd1d1
Add BLT_CMAKE_IMPLICIT_LINK_LIBRARIES_EXCLUDE variable
bmhan12 16fd27d
more fixes, switch to using BLT_BULD_HIP_WITH_HIPCC
robinson96 f2dbca5
clarity/ cleanup suggestions
chapman39 3a32077
Merge branch 'feature/chapman39/print_target_properties_recursive' of…
chapman39 74d1cd9
wording
chapman39 0142ece
wording for print target macro desc
chapman39 5aa089a
re-add 'property' to target type
chapman39 197eacc
Merge pull request #590 from LLNL/feature/chapman39/print_target_prop…
white238 6bd8250
add axom try_compile macro to blt
kennyweiss 8b6a419
turn on CMP0067 even though it only works on some CMake versions
white238 7901598
documentation and release notes for blt_check_code_compiles
white238 a3e380e
add clarifying note
white238 a221641
add comment about bracket arguments
white238 517ccd4
Merge pull request #600 from LLNL/feature/white238/add_try_compile
white238 17890f4
Merge branch 'develop' into feature/han12/implicit_libs_exclude
bmhan12 43f0b41
Merge pull request #598 from LLNL/feature/han12/implicit_libs_exclude
white238 ee5d430
bump version
white238 84fe0d1
Merge pull request #601 from LLNL/v0.5.2-rc
white238 97ea54d
Merge pull request #602 from LLNL/main
white238 9cc55a2
Guard compiler flag against crayftn
BurlMHall 5fbc647
release notes
white238 2b6676b
consistent formatting
white238 a624eb8
allow starting at 15.0.0
white238 8c22999
Merge pull request #608 from LLNL/bugfix/white238/crayftn_hip
white238 98ee862
Merge branch 'feature/probinso/hipcc_support' into ale3d
robinson96 8d39e04
merge blt changes from ale3d develop to new submodule.
robinson96 bf2d30b
whitespace cleanup.
robinson96 c92ef98
reduce differences from pristine.
robinson96 896f04f
fix logic in setting BLT_ADD_ROCM_PATH_COMPILER_FLAG
robinson96 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -190,7 +190,7 @@ macro(blt_find_executable) | |
string(TOUPPER ${arg_NAME} _ucname) | ||
|
||
message(STATUS "${arg_NAME} support is ${ENABLE_${_ucname}}") | ||
if (ENABLE_${_ucname}) | ||
if (${ENABLE_${_ucname}}) | ||
set(_exes ${arg_NAME}) | ||
if (DEFINED arg_EXECUTABLES) | ||
set(_exes ${arg_EXECUTABLES}) | ||
|
@@ -491,6 +491,87 @@ macro(blt_setup_target) | |
|
||
endmacro(blt_setup_target) | ||
|
||
##------------------------------------------------------------------------------ | ||
## blt_setup_hip_target(NAME <name of target> | ||
## SOURCES <list of sources> | ||
## DEPENDS_ON <list of dependencies> | ||
## LIBRARY_TYPE <STATIC, SHARED, OBJECT, or blank for executables>) | ||
##------------------------------------------------------------------------------ | ||
macro(blt_setup_hip_target) | ||
|
||
set(options) | ||
set(singleValueArgs NAME LIBRARY_TYPE) | ||
set(multiValueArgs SOURCES DEPENDS_ON) | ||
|
||
# Parse the arguments | ||
cmake_parse_arguments(arg "${options}" "${singleValueArgs}" | ||
"${multiValueArgs}" ${ARGN} ) | ||
|
||
# Check arguments | ||
if ( NOT DEFINED arg_NAME ) | ||
message( FATAL_ERROR "Must provide a NAME argument to the 'blt_setup_hip_target' macro") | ||
endif() | ||
|
||
if ( NOT DEFINED arg_SOURCES ) | ||
message( FATAL_ERROR "Must provide SOURCES to the 'blt_setup_hip_target' macro") | ||
endif() | ||
|
||
# Determine if hip or hip_runtime are in DEPENDS_ON | ||
list(FIND arg_DEPENDS_ON "blt::hip" _hip_index) | ||
set(_depends_on_hip FALSE) | ||
if(${_hip_index} GREATER -1) | ||
set(_depends_on_hip TRUE) | ||
endif() | ||
list(FIND arg_DEPENDS_ON "blt::hip_runtime" _hip_runtime_index) | ||
set(_depends_on_hip_runtime FALSE) | ||
if(${_hip_runtime_index} GREATER -1) | ||
set(_depends_on_hip_runtime TRUE) | ||
endif() | ||
message("DEPENDS ON HIP ${_depends_on_hip} DEPENDS_ON_HIP_RUNTIME ${_depends_on_hip_runtime}\n\t ${arg_DEPENDS_ON}") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this a debug message? There are a few others like it as well. |
||
if (${_depends_on_hip_runtime} OR ${_depends_on_hip}) | ||
if (HIP_LINK_WITH_HIPCC) | ||
set_target_properties( ${arg_NAME} PROPERTIES LINKER_LANGUAGE HIP) | ||
# This will be propagated up to executable targets that depend on this | ||
# library, which will need the HIP linker | ||
set_target_properties( ${arg_NAME} PROPERTIES INTERFACE_BLT_LINKER_LANGUAGE_OVERRIDE HIP) | ||
endif() | ||
endif() | ||
|
||
if (${_depends_on_hip}) | ||
# if hip is in depends_on, flag each file's language as HIP | ||
# instead of leaving it up to CMake to decide | ||
# Note: we don't do this when depending on just 'hip_runtime' | ||
set(_hip_sources) | ||
set(_non_hip_sources) | ||
blt_split_source_list_by_language(SOURCES ${arg_SOURCES} | ||
CXX_LIST _hip_sources | ||
C_LIST _non_hip_sources | ||
Fortran_LIST _non_hip_sources) | ||
message("ALL_SOURCES: ${arg_SOURCES}\n\t HIP SOURCES ${_hip_sources}") | ||
set_source_files_properties( ${_hip_sources} PROPERTIES | ||
LANGUAGE HIP) | ||
|
||
# if (HIP_SEPARABLE_COMPILATION) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you document why this isn't being used? |
||
# set_source_files_properties( ${_hip_sources} PROPERTIES | ||
# HIP_SEPARABLE_COMPILATION ON) | ||
# set_target_properties( ${arg_NAME} PROPERTIES | ||
# HIP_SEPARABLE_COMPILATION ON) | ||
# endif() | ||
|
||
if (DEFINED arg_LIBRARY_TYPE) | ||
if (${arg_LIBRARY_TYPE} STREQUAL "static") | ||
set_target_properties( ${arg_NAME} PROPERTIES | ||
CMAKE_HIP_CREATE_STATIC_LIBRARY ON) | ||
else() | ||
set_target_properties( ${arg_NAME} PROPERTIES | ||
CMAKE_HIP_CREATE_STATIC_LIBRARY OFF) | ||
endif() | ||
endif() | ||
|
||
endif() | ||
# message(FATAL_ERROR "stopping") | ||
endmacro(blt_setup_hip_target) | ||
|
||
|
||
##------------------------------------------------------------------------------ | ||
## blt_setup_cuda_target(NAME <name of target> | ||
|
@@ -546,6 +627,7 @@ macro(blt_setup_cuda_target) | |
set(_non_cuda_sources) | ||
blt_split_source_list_by_language(SOURCES ${arg_SOURCES} | ||
C_LIST _cuda_sources | ||
CXX_LIST _cuda_sources | ||
Fortran_LIST _non_cuda_sources) | ||
|
||
set_source_files_properties( ${_cuda_sources} PROPERTIES | ||
|
@@ -622,6 +704,7 @@ endmacro(blt_make_file_ext_regex) | |
##------------------------------------------------------------------------------ | ||
## blt_split_source_list_by_language( SOURCES <sources> | ||
## C_LIST <list name> | ||
## CXX_LIST <list name> | ||
## Fortran_LIST <list name> | ||
## Python_LIST <list name> | ||
## CMAKE_LIST <list name>) | ||
|
@@ -637,7 +720,7 @@ endmacro(blt_make_file_ext_regex) | |
macro(blt_split_source_list_by_language) | ||
|
||
set(options) | ||
set(singleValueArgs C_LIST Fortran_LIST Python_LIST CMAKE_LIST) | ||
set(singleValueArgs C_LIST CXX_LIST Fortran_LIST Python_LIST CMAKE_LIST) | ||
set(multiValueArgs SOURCES) | ||
|
||
# Parse the arguments | ||
|
@@ -653,6 +736,9 @@ macro(blt_split_source_list_by_language) | |
set(BLT_C_FILE_REGEX) | ||
blt_make_file_ext_regex(EXTENSIONS ${BLT_C_FILE_EXTS} | ||
OUTPUT_REGEX BLT_C_FILE_REGEX) | ||
set(BLT_CXX_FILE_REGEX) | ||
blt_make_file_ext_regex(EXTENSIONS ${BLT_CXX_FILE_EXTS} | ||
OUTPUT_REGEX BLT_CXX_FILE_REGEX) | ||
set(BLT_Fortran_FILE_REGEX) | ||
blt_make_file_ext_regex(EXTENSIONS ${BLT_Fortran_FILE_EXTS} | ||
OUTPUT_REGEX BLT_Fortran_FILE_REGEX) | ||
|
@@ -686,6 +772,10 @@ macro(blt_split_source_list_by_language) | |
if (DEFINED arg_C_LIST) | ||
list(APPEND ${arg_C_LIST} "${_file}") | ||
endif() | ||
elseif("${_lower_file}" MATCHES "${BLT_CXX_FILE_REGEX}") | ||
if (DEFINED arg_CXX_LIST) | ||
list(APPEND ${arg_CXX_LIST} "${_file}") | ||
endif() | ||
elseif("${_lower_file}" MATCHES "${BLT_Fortran_FILE_REGEX}") | ||
if (DEFINED arg_Fortran_LIST) | ||
list(APPEND ${arg_Fortran_LIST} "${_file}") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update the comment to say C rather than C/CXX. And the following comment should have CXX instead of C/CXX.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will have pretty large user facing consequences and needs to be considered carefully.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might only be my problem though:
https://sourcegraph.com/search?q=context:global+repo:github.com/llnl/*+BLT_C_FILE_EXTS&patternType=standard