Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
78f0705
Porting OpTensorLeadingOnes kernels to HIP
stulebae Dec 15, 2025
6694006
Check results of OpenCL kernel
stulebae Dec 17, 2025
fd07aed
Fixed clang-format violations
stulebae Dec 17, 2025
e7af4ba
Update tensor_leading_ones_ocl_hip.cpp
stulebae Dec 17, 2025
b2cab05
Fixing typo in parameters of kernel call
stulebae Dec 18, 2025
e1b03df
Removing boost::small_vector from OpKernelArg
stulebae Dec 18, 2025
7f8c716
Merge branch 'develop' into users/stulebae/tensor_leading_ones_HIP
stulebae Dec 18, 2025
7915d92
Fixed the order of arguments in kernel call
stulebae Dec 19, 2025
0e0fbcd
Merge branch 'develop' into users/stulebae/tensor_leading_ones_HIP
stulebae Dec 19, 2025
63080b1
Merge branch 'develop' into users/stulebae/tensor_leading_ones_HIP
stulebae Dec 19, 2025
aeba9b6
Changed arrange of TensorsConfig
stulebae Dec 22, 2025
73ef795
Added debug output
stulebae Dec 23, 2025
19fa395
Restored order of arguments in OpTensorLeadingOnes call
stulebae Dec 23, 2025
a630a1b
Update op_kernel_args.hpp
stulebae Dec 23, 2025
aa751e1
Update tensor_leading_ones_ocl_hip.cpp
stulebae Dec 23, 2025
4913ceb
Fixed the type of 'alpha, beta'
stulebae Dec 24, 2025
0848d69
Merge branch 'develop' into users/stulebae/tensor_leading_ones_HIP
stulebae Jan 20, 2026
07e7a81
Fixing clang-format-violations in MIOpenTensorKernelsHip.cpp
stulebae Jan 20, 2026
1399dbd
Removed mention of non existent source files from src/CMakeLists.txt
stulebae Jan 20, 2026
55ba2b8
Update CMakeLists.txt for MIOpenUtilKernels5
stulebae Jan 20, 2026
78376e4
Update CMakeLists.txt for MIOpenRNNHiddenStateUpdate
stulebae Jan 20, 2026
e923d42
Revert IsTF32Supported() in target_properties.hpp
stulebae Jan 20, 2026
2becfd6
Update CMakeLists.txt
stulebae Jan 20, 2026
28e96ff
Removed non functional changes in op_kernel_args.hpp
stulebae Jan 22, 2026
46bb491
Merge branch 'develop' into users/stulebae/tensor_leading_ones_HIP
stulebae Jan 23, 2026
dfd4276
Merge branch 'develop' into users/stulebae/tensor_leading_ones_HIP
stulebae Jan 26, 2026
15cc6d3
Merge branch 'develop' into users/stulebae/tensor_leading_ones_HIP
stulebae Jan 27, 2026
ab6c99b
Merge branch 'develop' into users/stulebae/tensor_leading_ones_HIP
stulebae Jan 27, 2026
b4c8ddb
Merge branch 'develop' into users/stulebae/tensor_leading_ones_HIP
stulebae Jan 29, 2026
3a94a04
Merge branch 'develop' into users/stulebae/tensor_leading_ones_HIP
stulebae Jan 30, 2026
b4b8ef5
Removed changes from MIOpenTensorKernels.cl file
stulebae Jan 31, 2026
776718c
Merge branch 'develop' into users/stulebae/tensor_leading_ones_HIP
stulebae Feb 2, 2026
0d95f99
Update tensor_leading_ones_ocl_hip.cpp
stulebae Feb 2, 2026
7c062c8
Merge branch 'develop' into users/stulebae/tensor_leading_ones_HIP
stulebae Feb 2, 2026
1526e94
Update tensor_leading_ones_generic_ocl_hip.cpp
stulebae Feb 3, 2026
a54506a
Update CMakeLists.txt
stulebae Feb 3, 2026
1f0fed8
Checking code for gfx1151 arch
stulebae Feb 8, 2026
4d9ec32
Update tensor_leading_ones_generic_ocl_hip.cpp
stulebae Feb 8, 2026
0a3d74e
Merge branch 'develop' into users/stulebae/tensor_leading_ones_HIP
stulebae Feb 9, 2026
ce84dff
Removed debug purposes code
stulebae Feb 9, 2026
6477a09
Fixed clang-format violations
stulebae Feb 9, 2026
50ca4eb
Removed unrelated changes in CMakeLists.txt
stulebae Feb 11, 2026
a5e0ada
Merge branch 'develop' into users/stulebae/tensor_leading_ones_HIP
stulebae Feb 11, 2026
b58f000
Update MIOpenTensorKernelsHip.cpp
stulebae Feb 11, 2026
a03b9c4
Update CMakeLists.txt
stulebae Feb 11, 2026
11b9b5f
Merge branch 'develop' into users/stulebae/tensor_leading_ones_HIP
stulebae Feb 11, 2026
543e792
Merge branch 'develop' into users/stulebae/tensor_leading_ones_HIP
stulebae Feb 17, 2026
ce6c0da
Merge branch 'develop' into users/stulebae/tensor_leading_ones_HIP
stulebae Mar 3, 2026
c7b3671
Added GTest versions of LSTM tests
stulebae Mar 26, 2026
b7f58fa
For resolving merge conflicts
stulebae Mar 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion projects/miopen/.clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
ForEachMacros: [ foreach, Q_FOREACH ]
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
Expand Down
7 changes: 1 addition & 6 deletions projects/miopen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,7 @@ set( MIOPEN_BACKEND ${MIOPEN_DEFAULT_BACKEND} CACHE STRING
set_property( CACHE MIOPEN_BACKEND PROPERTY STRINGS
OpenCL HIP HIPOC HIPNOGPU)

# On Windows, internal symbols are only exported when BUILD_TESTING=true. As a result, building driver with BUILD_TESTING=false will result in failure.
set_var_to_condition(MIOPEN_BUILD_DRIVER_DEFAULT (NOT MIOPEN_EMBED_BUILD) AND (NOT (MIOPEN_BACKEND STREQUAL "HIPNOGPU")) AND ((NOT WIN32) OR BUILD_TESTING))
set_var_to_condition(MIOPEN_BUILD_DRIVER_DEFAULT (NOT MIOPEN_EMBED_BUILD) AND (NOT (MIOPEN_BACKEND STREQUAL "HIPNOGPU")))
option(MIOPEN_BUILD_DRIVER "Build MIOpenDriver (and use it in tests)" ${MIOPEN_BUILD_DRIVER_DEFAULT})
message(STATUS "MIOPEN_BUILD_DRIVER: ${MIOPEN_BUILD_DRIVER}" )

Expand Down Expand Up @@ -472,10 +471,6 @@ if(MIOPEN_USE_HIPRTC)
message(STATUS "Build with hiprtc ${hiprtc_VERSION} ${hiprtc_DIR}")
endif()

option(Boost_USE_STATIC_LIBS "Use boost static libraries" ON)
add_definitions(-DBOOST_ALL_NO_LIB=1)
find_package(Boost REQUIRED COMPONENTS filesystem CONFIG)

find_path(HALF_INCLUDE_DIR half/half.hpp)
message(STATUS "HALF_INCLUDE_DIR: ${HALF_INCLUDE_DIR}")

Expand Down
2 changes: 2 additions & 0 deletions projects/miopen/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ RUN if [ "$THEROCK_BUILD_MODE" = "Preset" ]; then \
-DTHEROCK_ENABLE_RAND=ON \
-DTHEROCK_ENABLE_ROCPROFSYS=ON \
-DTHEROCK_ENABLE_ROCPROF_TRACE_DECODER_BINARY=ON \
-DTHEROCK_ENABLE_ROCGDB=ON \
-DTHEROCK_AMDGPU_DIST_BUNDLE_NAME=multiarch \
-DTHEROCK_AMDGPU_FAMILIES=$THEROCK_ASIC; \
else \
Expand All @@ -212,6 +213,7 @@ RUN if [ "$THEROCK_BUILD_MODE" = "Preset" ]; then \
-DTHEROCK_ENABLE_RAND=ON \
-DTHEROCK_ENABLE_ROCPROFSYS=ON \
-DTHEROCK_ENABLE_ROCPROF_TRACE_DECODER_BINARY=ON \
-DTHEROCK_ENABLE_ROCGDB=ON \
-DTHEROCK_AMDGPU_DIST_BUNDLE_NAME=multiarch \
-DTHEROCK_AMDGPU_FAMILIES=$THEROCK_ASIC; \
fi
Expand Down
15 changes: 2 additions & 13 deletions projects/miopen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ To install MIOpen, you must first install these prerequisites:
* [ROCm CMake](https://github.com/ROCm/rocm-cmake): provides CMake modules for common build
tasks needed for the ROCm software stack
* [Half](http://half.sourceforge.net/): IEEE 754-based, half-precision floating-point library
* [Boost](http://www.boost.org/): Version 1.79 is recommended, as older versions may need patches to
work on newer systems
* MIOpen uses `boost-system` and `boost-filesystem` packages to enable persistent
[kernel cache](https://rocm.docs.amd.com/projects/MIOpen/en/latest/cache.html)
* [SQLite3](https://sqlite.org/index.html): A reading and writing performance database
* lbzip2: A multi-threaded compress or decompress utility
* [rocBLAS](https://github.com/ROCm/rocm-libraries/tree/develop/projects/rocblas): AMD's library for Basic Linear Algebra Subprograms
Expand Down Expand Up @@ -330,19 +326,12 @@ switch branches or merge changes in Git to ensure any large binaries are kept in

## Installing the dependencies manually

If you're using Ubuntu v16, you can install the `Boost` packages using:
If you're using Ubuntu, you can install the `BZip2` packages using:

```shell
sudo apt-get install libboost-dev
sudo apt-get install libboost-system-dev
sudo apt-get install libboost-filesystem-dev
sudo apt-get install libbz2-dev
```

>[!NOTE]
>By default, MIOpen attempts to build with Boost statically linked libraries. If required, you can build
with dynamically linked Boost libraries using the `-DBoost_USE_STATIC_LIBS=Off` flag during the
configuration stage. However, this is not recommended.

You must install the `half` header from the [half website](http://half.sourceforge.net/).

## Using Docker
Expand Down
50 changes: 24 additions & 26 deletions projects/miopen/addkernels/addkernels.cpp
Original file line number Diff line number Diff line change
@@ -1,28 +1,6 @@
/*******************************************************************************
*
* MIT License
*
* Copyright (c) 2017 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.
*
*******************************************************************************/
// Copyright © Advanced Micro Devices, Inc., or its affiliates.
// SPDX-License-Identifier: MIT

#include "include_inliner.hpp"
#include "miopen/filesystem.hpp"
#include <algorithm>
Expand Down Expand Up @@ -316,7 +294,27 @@ int main(int argc, char* argv[])
std::string arg(argv[i]);
std::transform(arg.begin(), arg.end(), arg.begin(), ::tolower);

if(arg == "-s" || arg == "-source")
// Handle response file (starts with @)
if(arg.starts_with('@'))
{
std::string response_file = std::string(argv[i]).substr(1);
std::ifstream file(response_file);
if(!file.is_open())
{
std::cerr << "Error: Cannot open response file: " << response_file << std::endl;
return 1;
}

std::string line;
while(std::getline(file, line))
{
if(!line.empty() && !line.starts_with('#'))
{
sourceFiles.emplace_back(line);
}
}
}
else if(arg == "-s" || arg == "-source")
{
while(++i < argc && *argv[i] != '-')
sourceFiles.emplace_back(argv[i]);
Expand Down
10 changes: 7 additions & 3 deletions projects/miopen/cmake/CppCheck.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,8 @@ macro(enable_cppcheck)
file(GLOB_RECURSE GSRCS ${GLOBS})
set(CPPCHECK_COMMAND
${CPPCHECK_EXE}
-q
# -v
# --report-progress
-v
--checkers-report=${CMAKE_BINARY_DIR}/cppcheck-checkers-report.txt
${CPPCHECK_FORCE}
--cppcheck-build-dir=${CPPCHECK_BUILD_DIR}
--platform=native
Expand All @@ -115,6 +114,11 @@ macro(enable_cppcheck)
RESULT_VARIABLE RESULT
)
if(NOT RESULT EQUAL 0)
message(WARNING \"Cppcheck failed with exit code \${RESULT}\")
if(EXISTS \"${CMAKE_BINARY_DIR}/cppcheck-checkers-report.txt\")
file(READ \"${CMAKE_BINARY_DIR}/cppcheck-checkers-report.txt\" CHECKERS_REPORT)
message(WARNING \"\${CHECKERS_REPORT}\")
endif()
message(FATAL_ERROR \"Cppcheck failed\")
endif()
")
Expand Down
136 changes: 0 additions & 136 deletions projects/miopen/cmake/EnableCompilerWarnings.cmake

This file was deleted.

14 changes: 7 additions & 7 deletions projects/miopen/driver/InputFlags.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ TensorParameters InputFlags::GetValueTensor(const std::string& long_name) const
if(components.empty())
return {};

auto parse = [](auto line) {
auto parse = [](const std::string& line) {
auto ret = std::vector<int>{};
const auto strs = miopen::SplitDelim(line, 'x');
for(auto&& str : strs)
Expand Down Expand Up @@ -301,7 +301,7 @@ TensorParametersUint64 InputFlags::GetValueTensorUint64(const std::string& long_
if(components.size() < 1)
return {};

auto parse = [](auto line) {
auto parse = [](const std::string& line) {
auto ret = std::vector<uint64_t>{};
const auto strs = miopen::SplitDelim(line, 'x');
for(auto&& str : strs)
Expand Down Expand Up @@ -386,12 +386,12 @@ InputFlags::GetValue2dVectorInt(const std::string& long_name) const
{
const auto& input = MapInputs.at(FindShortName(long_name));
const auto components = miopen::SplitDelim(input.value.c_str(), ',');
auto output = std::vector<std::vector<int32_t>>{};
std::vector<std::vector<int32_t>> output;

if(components.size() < 1)
return {};
return output;

auto parse = [](auto line) {
auto parse = [](const std::string& line) {
auto ret = std::vector<int32_t>{};
const auto strs = miopen::SplitDelim(line, 'x');
for(auto&& str : strs)
Expand Down Expand Up @@ -421,12 +421,11 @@ InputFlags::GetValue2dVectorUint64(const std::string& long_name) const
{
const auto& input = MapInputs.at(FindShortName(long_name));
const auto components = miopen::SplitDelim(input.value.c_str(), ',');
auto output = std::vector<std::vector<uint64_t>>{};

if(components.size() < 1)
return {};

auto parse = [](auto line) {
auto parse = [](const std::string& line) {
auto ret = std::vector<uint64_t>{};
const auto strs = miopen::SplitDelim(line, 'x');
for(auto&& str : strs)
Expand All @@ -443,6 +442,7 @@ InputFlags::GetValue2dVectorUint64(const std::string& long_name) const
return ret;
};

auto output = std::vector<std::vector<uint64_t>>{};
for(auto&& component : components)
{
output.push_back(parse(component));
Expand Down
3 changes: 1 addition & 2 deletions projects/miopen/driver/adam_driver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,11 +333,10 @@ int AdamDriver<Tgpu, Tref, Tgrad>::AddCmdLineArgs()
template <typename Tgpu, typename Tref, typename Tgrad>
std::vector<int> AdamDriver<Tgpu, Tref, Tgrad>::GetInputTensorLengthsFromCmdLine()
{
std::vector<int> ret;
auto tensor = inflags.GetValueTensor("dims");
if(!tensor.lengths.empty())
return tensor.lengths;
return ret;
return {};
}

template <typename Tgpu, typename Tref, typename Tgrad>
Expand Down
Loading