Skip to content

Commit

Permalink
Merge branch 'develop' into GTests_Refactoring_Integration_Branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Vsevolod1983 committed Oct 2, 2024
2 parents c6ae554 + fc96df7 commit 590de6e
Show file tree
Hide file tree
Showing 39 changed files with 2,064 additions and 2,744 deletions.
10 changes: 10 additions & 0 deletions docs/conceptual/perfdb.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,16 @@ You can override the latter two conditions by enforcing the search using the
``- MIOPEN_FIND_ENFORCE`` environment variable. You can also use this variable to remove values
from User PerfDb, as described in the following section.

To optimize performance, MIOpen provides several find modes to accelerate find API calls.
These modes include:

* normal find
* fast find
* hybrid find
* dynamic hybrid find

For more information about MIOpen find modes, see :ref:`Find modes <find_modes>`.

Using MIOPEN_FIND_ENFORCE
----------------------------------------------------------------------------------------------------------

Expand Down
1 change: 1 addition & 0 deletions docs/how-to/find-and-immediate.rst
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ OpenCL). MIOpenGEMM only contains support for FP32.

The HIP backend uses rocBLAS as its fallback path, which contains a more robust set of datatypes.

.. _find_modes:

Find modes
============================================================
Expand Down
1 change: 1 addition & 0 deletions docs/reference/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,5 @@ The MIOpen API library is structured as follows:
* :doc:`ReduceCalculation <../doxygen/html/group__ReduceCalculation>` (experimental)
* :doc:`RotaryPositionalEmbeddings <../doxygen/html/group__RotaryPositionalEmbeddings>` (experimental)
* :doc:`ReLU <../doxygen/html/group___re_l_u>` (experimental)
* :doc:`Kthvalue <../doxygen/html/group__kthvalue>` (experimental)
* :doc:`GLU <../doxygen/html/group__glu>` (experimental)
1 change: 1 addition & 0 deletions driver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ add_executable(MIOpenDriver
dm_getitem.cpp
dm_glu.cpp
dm_groupnorm.cpp
dm_kthvalue.cpp
dm_layernorm.cpp
dm_lrn.cpp
dm_pool.cpp
Expand Down
41 changes: 41 additions & 0 deletions driver/dm_kthvalue.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*******************************************************************************
*
* MIT License
*
* Copyright (c) 2024 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.
*
*******************************************************************************/

#include "registry_driver_maker.hpp"
#include "kthvalue_driver.hpp"

static Driver* makeDriver(const std::string& base_arg)
{
if(base_arg == "kthvalue")
return new KthvalueDriver<float>();
else if(base_arg == "kthvaluefp16")
return new KthvalueDriver<float16>();
else if(base_arg == "kthvaluebfp16")
return new KthvalueDriver<bfloat16>();
return nullptr;
}

REGISTER_DRIVER_MAKER(makeDriver);
5 changes: 3 additions & 2 deletions driver/driver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ inline void PadBufferSize(size_t& sz, int datatype_sz)
"t5layernorm[bfp16|fp16], adam[fp16], ampadam, reduceextreme[bfp16|fp16], "
"adamw[fp16], ampadamw, transformersadamw[fp16], transformersampadamw, "
"getitem[bfp16|fp16], reducecalculation[bfp16|fp16], rope[bfp16|fp16], "
"prelu[bfp16|fp16], glu[bfp16|fp16]\n");
"prelu[bfp16|fp16], kthvalue[bfp16|fp16], glu[bfp16|fp16]\n");
exit(0); // NOLINT (concurrency-mt-unsafe)
}

Expand Down Expand Up @@ -209,7 +209,8 @@ inline std::string ParseBaseArg(int argc, char* argv[])
arg != "getitemfp16" && arg != "getitembfp16" && arg != "reducecalculation" &&
arg != "reducecalculationfp16" && arg != "reducecalculationbfp16" && arg != "rope" &&
arg != "ropefp16" && arg != "ropebfp16" && arg != "prelu" && arg != "prelufp16" &&
arg != "prelubfp16" && arg != "glu" && arg != "glufp16" && arg != "glubfp16" &&
arg != "prelubfp16" && arg != "kthvalue" && arg != "kthvaluefp16" &&
arg != "kthvaluebfp16" && arg != "glu" && arg != "glufp16" && arg != "glubfp16" &&
arg != "--version")
{
printf("FAILED: Invalid Base Input Argument\n");
Expand Down
Loading

0 comments on commit 590de6e

Please sign in to comment.