Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 0 additions & 2 deletions dnn-providers/hipblaslt-provider/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,6 @@ target_compile_definitions(hipblaslt_plugin_private PRIVATE)
target_include_directories(hipblaslt_plugin_private PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(hipblaslt_plugin_private PUBLIC roc::hipblaslt hipdnn_data_sdk hipdnn_plugin_sdk hip::host)

# Enable spdlog support via plugin_sdk helper function
hipdnn_enable_spdlog(hipblaslt_plugin_private)
target_compile_options(hipblaslt_plugin_private PRIVATE ${HIPDNN_WARNING_COMPILE_OPTIONS})

add_library(hipblaslt_plugin SHARED HipblasltPluginPublic.cpp)
Expand Down
140 changes: 62 additions & 78 deletions dnn-providers/hipblaslt-provider/HipblasltPlugin.cpp

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions dnn-providers/hipblaslt-provider/HipblasltUtils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
#include <hipdnn_plugin_sdk/PluginLogging.hpp>
#include <string>

#define LOG_ON_HIPBLASLT_FAILURE(status) \
do \
{ \
if(status != HIPBLAS_STATUS_SUCCESS) \
{ \
HIPDNN_PLUGIN_LOG_ERROR( \
"hipBLASLt error occurred: {}", \
hipblaslt_plugin::hipblaslt_utils::hipblas_status_to_string(status)); \
} \
#define LOG_ON_HIPBLASLT_FAILURE(status) \
do \
{ \
if(status != HIPBLAS_STATUS_SUCCESS) \
{ \
HIPDNN_PLUGIN_LOG_ERROR( \
"hipBLASLt error occurred: " \
<< hipblaslt_plugin::hipblaslt_utils::hipblas_status_to_string(status)); \
} \
} while(0)

#define THROW_ON_HIPBLASLT_FAILURE(status) \
Expand Down
13 changes: 7 additions & 6 deletions dnn-providers/hipblaslt-provider/HipdnnEnginePluginHandle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ struct HipdnnEnginePluginHandle
void storeEngineDetailsDetachedBuffer(const void* ptr,
std::unique_ptr<flatbuffers::DetachedBuffer> buffer)
{
HIPDNN_PLUGIN_LOG_INFO("Storing detached buffer at address: {:p}", ptr);
HIPDNN_PLUGIN_LOG_INFO("Storing detached buffer at address: " << ptr);
_engineDetailsBuffers[ptr] = std::move(buffer);
}

void removeEngineDetailsDetachedBuffer(const void* ptr)
{
HIPDNN_PLUGIN_LOG_INFO("Removing detached buffer at address: {:p}", ptr);
HIPDNN_PLUGIN_LOG_INFO("Removing detached buffer at address: " << ptr);

auto it = _engineDetailsBuffers.find(ptr);
if(it != _engineDetailsBuffers.end())
Expand All @@ -57,10 +57,11 @@ struct HipdnnEnginePluginHandle
else
{
HIPDNN_PLUGIN_LOG_WARN(
"No detached buffer found at address: {:p}. Could not remove engine "
"details. Ensure you "
"are using the same hipdnn handle you used for engine details creation",
ptr);
"No detached buffer found at address: "
<< ptr
<< ". Could not remove engine "
"details. Ensure you "
"are using the same hipdnn handle you used for engine details creation");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ void HipblasltMatmulPlanBuilder::buildPlan(
validateGraphConfiguration(opGraph);

const auto& nodeWrapper = opGraph.getNodeWrapper(0);
HIPDNN_PLUGIN_LOG_INFO("Building matmul plan for node: {}", nodeWrapper.name());
HIPDNN_PLUGIN_LOG_INFO("Building matmul plan for node: " << nodeWrapper.name());

const auto& attr = nodeWrapper.attributesAs<hipdnn_data_sdk::data_objects::MatmulAttributes>();
MatmulParams params(attr, opGraph.getTensorMap());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ target_link_libraries(
hipblaslt_plugin_integration_tests PUBLIC GTest::gtest hip::host hipdnn_test_sdk hipdnn_plugin_sdk Threads::Threads
)

# Enable spdlog support for fmt-style logging
hipdnn_enable_spdlog(hipblaslt_plugin_integration_tests)

# Ensure that the hipblaslt_plugin is built before the hipblaslt_plugin_integration_tests, as the
# integration tests depend on the hipBLASLt Provider Plugin
add_dependencies(hipblaslt_plugin_integration_tests hipblaslt_plugin)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class IntegrationGraphVerificationHarness : public ::testing::TestWithParam<Test
<< "At least one output tensor id must be specified for "
"validation.";

HIPDNN_PLUGIN_LOG_INFO("Validating {} output tensors", outputTensorIds.size());
HIPDNN_PLUGIN_LOG_INFO("Validating " << outputTensorIds.size() << " output tensors");

// Lazily register validators after graph execution since tensor Ids and types may be inferred during graph finalization
for(const auto& registerValidator : _deferredValidators)
Expand Down
5 changes: 1 addition & 4 deletions dnn-providers/hipblaslt-provider/integration_tests/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ SPDX-License-Identifier: MIT
*/

#include <gtest/gtest.h>
#include <spdlog/spdlog.h>

#include <hipdnn_frontend.hpp>
#include <hipdnn_test_sdk/utilities/HipErrorHandler.hpp>
Expand All @@ -19,7 +18,5 @@ int main(int argc, char** argv)
testing::TestEventListeners& listeners = testing::UnitTest::GetInstance()->listeners();
listeners.Append(new hipdnn_test_sdk::utilities::HipErrorHandler);

auto result = RUN_ALL_TESTS();
spdlog::shutdown();
return result;
return RUN_ALL_TESTS();
}
5 changes: 1 addition & 4 deletions dnn-providers/hipblaslt-provider/tests/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ SPDX-License-Identifier: MIT
*/

#include <gtest/gtest.h>
#include <spdlog/spdlog.h>

#include <hipdnn_plugin_sdk/PluginLogging.hpp>
#include <hipdnn_test_sdk/utilities/HipErrorHandler.hpp>
Expand All @@ -20,7 +19,5 @@ int main(int argc, char** argv)
testing::TestEventListeners& listeners = testing::UnitTest::GetInstance()->listeners();
listeners.Append(new hipdnn_test_sdk::utilities::HipErrorHandler);

auto result = RUN_ALL_TESTS();
spdlog::shutdown();
return result;
return RUN_ALL_TESTS();
}