-
Notifications
You must be signed in to change notification settings - Fork 74
[HIP-VS][refactor] VS support for multiple HIP SDK versions #203
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
Draft
schung-amd
wants to merge
10
commits into
amd-staging
Choose a base branch
from
schung-amd/vcxproj-multi-version-support
base: amd-staging
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.
Draft
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
70dfe45
Initial patch for multi version support
schung-amd 8c219a9
Revert "Initial patch for multi version support"
schung-amd fed2c51
Amended with fixed indentation
schung-amd 2b65283
HIP_PATH guidance for multiple HIP SDK versions
schung-amd 37ccac0
More guidance for multiple HIP SDK versions
schung-amd 12a0f2d
Ensure toolset is loaded if version not hard-coded
schung-amd 873b0b8
Remove some duplicate imports
schung-amd 9bf8c1a
Remove hard-coded imports
schung-amd 7a4c598
Update missed static_host_library_library/*.vcxproj
schung-amd a0d1bd1
Reword HIP SDK toolset guidance
schung-amd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 |
---|---|---|
|
@@ -17,6 +17,12 @@ | |
<RootNamespace>bitonic_sort_vs2019</RootNamespace> | ||
<WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<HIPVersionFileContents>$([System.IO.File]::ReadAllText('$(HIP_PATH)bin\.hipversion'))</HIPVersionFileContents> | ||
<HIPVersionMajor>$(HIPVersionFileContents.Substring($([MSBuild]::Add($(HIPVersionFileContents.LastIndexOf("HIP_VERSION_MAJOR")),18)),2).Trim())</HIPVersionMajor> | ||
<HIPVersionMinor>$(HIPVersionFileContents.Substring($([MSBuild]::Add($(HIPVersionFileContents.LastIndexOf("HIP_VERSION_MINOR")),18)),2).Trim())</HIPVersionMinor> | ||
<HIPPathVersion>$(HIPVersionMajor).$(HIPVersionMinor)</HIPPathVersion> | ||
Comment on lines
+21
to
+24
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. This solution is to discuss with HIP-VS team. 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. Sure, let's discuss this offline at a later point in time. |
||
</PropertyGroup> | ||
<ItemGroup> | ||
<ClCompile Include="main.hip" /> | ||
</ItemGroup> | ||
|
@@ -28,13 +34,13 @@ | |
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> | ||
<ConfigurationType>Application</ConfigurationType> | ||
<UseDebugLibraries>true</UseDebugLibraries> | ||
<PlatformToolset>HIP clang 6.2</PlatformToolset> | ||
<PlatformToolset>HIP clang $(HIPPathVersion)</PlatformToolset> | ||
<CharacterSet>Unicode</CharacterSet> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> | ||
<ConfigurationType>Application</ConfigurationType> | ||
<UseDebugLibraries>false</UseDebugLibraries> | ||
<PlatformToolset>HIP clang 6.2</PlatformToolset> | ||
<PlatformToolset>HIP clang $(HIPPathVersion)</PlatformToolset> | ||
<CharacterSet>Unicode</CharacterSet> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(PlatformToolset.Contains(`HIP clang `))'"> | ||
|
@@ -56,6 +62,9 @@ | |
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> | ||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
</ImportGroup> | ||
<PropertyGroup Condition="'$(PlatformToolset)'!='HIP nvcc $(HIPPathVersion)' and '$(PlatformToolset)'!='HIP clang $(HIPPathVersion)'"> | ||
<ProjectExcludedFromBuild>true</ProjectExcludedFromBuild> | ||
</PropertyGroup> | ||
<PropertyGroup Label="UserMacros" /> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> | ||
<LinkIncremental>true</LinkIncremental> | ||
|
@@ -70,7 +79,7 @@ | |
<IntrinsicFunctions>true</IntrinsicFunctions> | ||
</ClCompile> | ||
</ItemDefinitionGroup> | ||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64' and '$(PlatformToolset)'=='HIP clang $(HIPVersion)'"> | ||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64' and $(PlatformToolset.Contains('HIP clang'))"> | ||
<ClCompile> | ||
<WarningLevel>Level2</WarningLevel> | ||
<PreprocessorDefinitions>__clang__;__HIP__;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
|
@@ -83,7 +92,7 @@ | |
<GenerateDebugInformation>true</GenerateDebugInformation> | ||
</Link> | ||
</ItemDefinitionGroup> | ||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64' and '$(PlatformToolset)'=='HIP nvcc $(HIPVersion)'"> | ||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64' and $(PlatformToolset.Contains('HIP nvcc'))"> | ||
<ClCompile> | ||
<WarningLevel>Level2</WarningLevel> | ||
<PreprocessorDefinitions>__CUDACC__;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
|
@@ -96,7 +105,7 @@ | |
<GenerateDebugInformation>true</GenerateDebugInformation> | ||
</Link> | ||
</ItemDefinitionGroup> | ||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64' and '$(PlatformToolset)'=='HIP clang $(HIPVersion)'"> | ||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64' and $(PlatformToolset.Contains('HIP clang'))"> | ||
<ClCompile> | ||
<WarningLevel>Level2</WarningLevel> | ||
<FunctionLevelLinking>true</FunctionLevelLinking> | ||
|
@@ -111,7 +120,7 @@ | |
<OptimizeReferences>true</OptimizeReferences> | ||
</Link> | ||
</ItemDefinitionGroup> | ||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64' and '$(PlatformToolset)'=='HIP nvcc $(HIPVersion)'"> | ||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64' and $(PlatformToolset.Contains('HIP nvcc'))"> | ||
<ClCompile> | ||
<WarningLevel>Level2</WarningLevel> | ||
<WholeProgramOptimization>true</WholeProgramOptimization> | ||
|
This file contains hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
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.
Here and below: unrelated change which has to be i a separate PR.