-
Notifications
You must be signed in to change notification settings - Fork 237
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
[API] Get/Set "ALT" ConvolutionAttribute. [Core] Pass attribute to Invokers. [FP16][NHWC][gfx90a][asm igemm] Build & run appropriate kernel. #1226
Conversation
…16_ALT_IMPL to control MIOPEN_DEBUG_FP16_ALT_IMP attribute
@carlushuang please see mail. |
… based on attribute MIOPEN_CONVOLUTION_ATTRIB_FP16_ALT_IMPL value
@atamazov @JehandadKhan this PR is workable, and with kernel from PR:#1227, can switch between fp16 alt impl and native fp16 impl. |
This comment has been minimized.
This comment has been minimized.
…e attribute. Some error handling. Comments.
I am working on this. Changes will most likely be required in #1227 (and I will take care of those) |
…nvAsmImplicitGemmGTCDynamicWrwXdlopsNHWC: Update Solver and Invokers.
@carlushuang Please look at changes in the WrW Solver, and ask questions about design, if any. Thanks. |
…ng. MIOPEN_DEBUG_FP16_ALT_IMP -> MIOPEN_DEBUG_CONVOLUTION_ATTRIB_FP16_ALT_IMPL.
…LT attribute via InvokeParams.
…Cm 4.5). Sort list of disabled warnings.
…he sake of clarity of the source code.
…Update Solver and Invoker.
…Update Solver and Invokers
…ecks" This reverts commit 5bb733f.
@carlushuang Please also review this, thanks. |
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.
LGTM. I'm going to merge this myself, as soon as it passes the CI.
The most recent commit is not yet picked up by CI, and whole set of test will take a long time. |
return [=](const Handle& handle, const AnyInvokeParams& primitive_parameters) mutable { | ||
decltype(auto) wrw_invoke_params = | ||
primitive_parameters.CastTo<conv::WrWInvokeParams>(); | ||
const auto& tensors = wrw_invoke_params.tensors; | ||
const auto k = handle.Run(kernels[0]); | ||
const auto& tensors = wrw_invoke_params.tensors; | ||
const auto k = handle.Run( | ||
kernels[(isGfx90aFp16altSupport && wrw_invoke_params.gfx90aFp16alt) ? 1 : 0]); |
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.
⚓
* Follows the design of #1226 - FP16 ALT kernels in GEMM obey the existing `MIOPEN_DEBUG_CONVOLUTION_ATTRIB_FP16_ALT_IMPL`. - [Informative] Also there is dedicated env control in rocBLAS, `ROCBLAS_INTERNAL_FP16_ALT_IMPL`. * Short explanation: - GEMM Invokers read gfx90aFp16alt attribute from the instance of AnyInvokeParams passed to it. - This attribute is then forwarded down to calls of `rocblas_gemm_ex` and `rocblas_gemm_strided_batched_ex`. - rocBLAS will make the determination at runtime, and ignore the attribute when not executing on gfx90a -⚠️ We expect that rocBLAS ignore the attribute for non-FP16 kernels. * This PR have no effect for GEMM backends other than rocBLAS.
This is prerequisite for #1227. No functional changes, except new API calls (these calls do not change the behavior of the library for now).
MIOPEN_DEBUG_CONVOLUTION_ATTRIB_FP16_ALT_IMPL
.ConvAsmImplicitGemmGTCDynamicWrwXdlopsNHWC:
-- @atamazov