-
Notifications
You must be signed in to change notification settings - Fork 228
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
Implement SigmoidFocalLoss operation #3143
base: develop
Are you sure you want to change the base?
Conversation
561ccf3
to
53b5359
Compare
It seems a part of this PR included into #3146 |
587d5e0
to
5427607
Compare
I have updated my code following comments in #3146 . Please take another look at my PR. |
e6ac834
to
e53a4e3
Compare
@junliume can you take a look at Windows build state, plz. I added MIOPEN_INTERNALS_EXPORT but it still fail. |
0fdbf27
to
a41a005
Compare
a066413
to
afc738f
Compare
2f827fd
to
41b9300
Compare
@iq136boy For this PR only, can you and your colleagues give comments about documentation problem? It's great to learn by examples. Please provide us the parts that you guys belive that it's importance to have or to be mentioned in documents. |
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.
PR is blocked by the following CI issue. The PR needs to restart CI after the issue is fixed.
[2024-09-23T14:07:43.339Z] Exception occurred: org.kohsuke.github.HttpException: {"message":"API rate limit exceeded for user ID 49319081. If you reach out to GitHub Support for help, please include the request ID
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.
Clang format check failed due to the following error:
[2024-09-25T19:30:49.319Z] sh -c 'clang-format-12 -style=file ../src/solver.cpp | diff - ../src/solver.cpp'
[2024-09-25T19:30:49.319Z] 683c683
[2024-09-25T19:30:49.319Z] <
[2024-09-25T19:30:49.319Z] ---
[2024-09-25T19:30:49.319Z] >
#ifndef IN_OUT_TYPE | ||
#define IN_OUT_TYPE float | ||
#endif | ||
|
||
#ifndef CVT_ACCUM2FLOAT | ||
#define CVT_ACCUM2FLOAT(x) (float_to_bfloat16(x)) | ||
#endif | ||
|
||
#ifndef CVT_FLOAT2ACCUM | ||
#define CVT_FLOAT2ACCUM(x) (bfloat16_to_float(x)) | ||
#endif |
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 part should be removed.
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.
Please update the reduction part in you code, following the implementation in #3166.
@@ -0,0 +1,157 @@ | |||
#pragma once |
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 file is missing the licensing header?
/*******************************************************************************
*
* MIT License
*
* Copyright (c) 2023 Advanced Micro Devices, Inc.
*
* 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.
*
*******************************************************************************/
3e5b5b1
to
6ef0056
Compare
255f550
to
0072e6c
Compare
This PR implement torchvision.ops.sigmoid_focal_loss operation. There is no constraint here, MIOpen is faster than ROCm in all cases.
Average improvement over ROCm
Reduced kernels:
Unreduced kernels:
Detail benchmark
Float32
Float16
BFloat16