-
Notifications
You must be signed in to change notification settings - Fork 87
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
Bf16 gpu support #3630
Draft
richagadgil
wants to merge
80
commits into
develop
Choose a base branch
from
bf16_gpu_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.
Draft
Bf16 gpu support #3630
Changes from 77 commits
Commits
Show all changes
80 commits
Select commit
Hold shift + click to select a range
c51c1ce
first pass at integrating generic float
richagadgil 134b408
fix namespaces
richagadgil d4fa6eb
fix mantissa
richagadgil 0b60841
refactor
richagadgil 7a646f1
refactor
richagadgil ebe819b
add fp
richagadgil 379a77a
fixed generic float class
richagadgil 174384c
add fp32 test
richagadgil 787b651
remove import
richagadgil 1d1fa1c
update tests
richagadgil 1791092
fp16 tests that work
richagadgil a2eb005
update tests
richagadgil ff8ffc7
updated fp16 and fp32 tests
richagadgil e36fd65
half tests
richagadgil 9ac4e2a
underflow and overflow tests
richagadgil f05fd31
generate map
richagadgil cb4d92d
add more tests
richagadgil 0cc1946
fix names
richagadgil 85a761b
update tests
richagadgil 65cf9ae
remove and
richagadgil fbabf54
disable warning
richagadgil 549f5e6
fix tidy warning
richagadgil d302e5d
migraphx py fix
richagadgil 8d475e3
add increments
richagadgil a0fd055
fix warnings
richagadgil 41379fe
disable duplicate branch warning
richagadgil 0c29c7b
add countzero_std
richagadgil 4b012a8
ci error
richagadgil dbaa3a8
simplify countl
richagadgil b2bd2a0
fix ci
richagadgil 6f328f0
src
richagadgil e6d9763
remove flag
richagadgil 6538050
hide abi warning
richagadgil 4e96d4d
revert changes
richagadgil ef11f1f
Merge branch 'develop' into generic_float
richagadgil e4a25bd
change half in tests
richagadgil 3354c6e
Update generic_float.hpp
richagadgil 6de079b
format
richagadgil 7750874
Merge branch 'develop' into generic_float
richagadgil 801f485
Merge branch 'develop' into generic_float
causten 33e2c8d
fix bug
richagadgil 9bb7198
Merge branch 'generic_float' of github.com:ROCm/AMDMIGraphX into gene…
richagadgil b3c345d
fix err
richagadgil 03df6f9
edits
richagadgil ad817b2
tidy and format
richagadgil 898417b
tidy etc
richagadgil aa5b9c9
gf
richagadgil 6f72370
fix tidy errs
richagadgil 0aab1a0
bf16 changes
richagadgil 7b965c0
add flag to trace quantization passes (#3571)
shivadbhavsar 5f5f13d
bf16
richagadgil d64b124
Update bf16.cpp
richagadgil a064eaa
Update bf16.hpp
richagadgil befbd9e
Update bf16.hpp
richagadgil 08b9511
update files with working version
richagadgil b9d204e
Update bf16.cpp
richagadgil fb6df2d
Update generic_float.hpp
richagadgil bb78138
Merge branch 'develop' into bf16
richagadgil 8e1f99e
add extra common type
richagadgil 6192970
tidy
richagadgil c0d6bc4
Update bf16.hpp
richagadgil 7bfc407
Update generic_float.hpp
richagadgil 4cb96ad
Merge branch 'develop' into bf16
richagadgil ffd4ba2
remove imports
richagadgil 8a10da3
Merge branch 'develop' into bf16
richagadgil 1565a0e
ref tests
richagadgil e6d1155
migraphx_py fix
richagadgil 867e960
fix test cae by index
richagadgil 9852da5
add rocblas type
richagadgil bf50653
fix tgts err
richagadgil 0ebd220
address changes
richagadgil 043e322
Merge branch 'develop' into bf16
richagadgil a3ca184
bf16 gpu support
richagadgil 490d326
add vector types
richagadgil a63ac1e
rocblas
richagadgil 94990bb
bf16 gpu testing
shivadbhavsar 8aaae90
mlir bf16
shivadbhavsar 208232e
fix type
richagadgil d4866d5
fix type
richagadgil 59eec66
add type
richagadgil 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 |
---|---|---|
|
@@ -32,6 +32,7 @@ enum class precision | |
{ | ||
fp32, | ||
fp16, | ||
bf16, | ||
int8 | ||
}; | ||
|
||
|
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* The MIT License (MIT) | ||
* | ||
* Copyright (c) 2015-2024 Advanced Micro Devices, Inc. All rights reserved. | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
* THE SOFTWARE. | ||
*/ | ||
|
||
#ifndef MIGRAPHX_GUARD_RTGLIB_BF16_HPP | ||
#define MIGRAPHX_GUARD_RTGLIB_BF16_HPP | ||
|
||
#include <migraphx/generic_float.hpp> | ||
#include <migraphx/config.hpp> | ||
|
||
namespace migraphx { | ||
inline namespace MIGRAPHX_INLINE_NS { | ||
|
||
using bf16 = migraphx::generic_float<7, 8>; | ||
|
||
} // namespace MIGRAPHX_INLINE_NS | ||
} // namespace migraphx | ||
|
||
#endif |
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
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
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
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
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
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.
There is duplicate typedefs here and they are both wrong. It should be
using bf16 = __hip_bfloat16
.