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
8 changes: 7 additions & 1 deletion cmake/ExportHeader.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#####################################################################################
# The MIT License (MIT)
#
# Copyright (c) 2015-2023 Advanced Micro Devices, Inc. All rights reserved.
# Copyright (c) 2015-2026 Advanced Micro Devices, Inc. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -39,6 +39,12 @@ function(migraphx_generate_export_header TARGET)
string(REPLACE "_" "/" __directory ${TARGET})
string(TOLOWER ${__directory} __directory)
endif()
if(NOT WIN32)
set_target_properties(${TARGET} PROPERTIES
C_VISIBILITY_PRESET hidden
CXX_VISIBILITY_PRESET hidden
VISIBILITY_INLINES_HIDDEN YES)
endif()
set(__file_name ${CMAKE_CURRENT_BINARY_DIR}/include/${__directory}/export.h)
generate_export_header(${TARGET} EXPORT_FILE_NAME ${__file_name})
target_include_directories(${TARGET} PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>)
Expand Down
5 changes: 4 additions & 1 deletion src/targets/gpu/compile_hipblaslt.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2015-2024 Advanced Micro Devices, Inc. All rights reserved.
* Copyright (c) 2015-2026 Advanced Micro Devices, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand All @@ -25,6 +25,7 @@
#if MIGRAPHX_USE_HIPBLASLT
#include <migraphx/gpu/compile_hipblaslt.hpp>
#include <migraphx/gpu/context.hpp>
#include <migraphx/register_op.hpp>
#include <migraphx/module.hpp>
#include <migraphx/iterator_for.hpp>
#include <migraphx/instruction.hpp>
Expand All @@ -34,6 +35,8 @@ namespace migraphx {
inline namespace MIGRAPHX_INLINE_NS {
namespace gpu {

MIGRAPHX_REGISTER_OP(hipblaslt_op);

static size_t compile(migraphx::context& ctx, operation& op, instruction_ref ins)
{
auto v = op.compile(ctx, ins->get_shape(), to_shapes(ins->inputs()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,14 @@
#include <migraphx/config.hpp>
#include <migraphx/instruction_ref.hpp>
#include <migraphx/op/identity.hpp>
#include <migraphx/register_op.hpp>
#include <migraphx/operation.hpp>
#include <string>

namespace migraphx {
inline namespace MIGRAPHX_INLINE_NS {

struct module;
struct context;
struct operation;

namespace gpu {

Expand All @@ -62,7 +61,6 @@ struct hipblaslt_op
return {shapes.size() - 1};
}
};
MIGRAPHX_REGISTER_OP(hipblaslt_op);

struct compile_hipblaslt
{
Expand Down
7 changes: 4 additions & 3 deletions src/targets/gpu/include/migraphx/gpu/hip_gemm_impl.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2015-2025 Advanced Micro Devices, Inc. All rights reserved.
* Copyright (c) 2015-2026 Advanced Micro Devices, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand All @@ -24,6 +24,7 @@
#ifndef MIGRAPHX_GUARD_RTGLIB_HIP_GEMM_IMPL_HPP
#define MIGRAPHX_GUARD_RTGLIB_HIP_GEMM_IMPL_HPP

#include <migraphx/gpu/export.h>
#include <migraphx/shape.hpp>
#include <migraphx/argument.hpp>
#include <migraphx/gpu/context.hpp>
Expand All @@ -40,8 +41,8 @@ namespace gpu {
using milliseconds = std::chrono::duration<double, std::milli>;
using microseconds = std::chrono::duration<double, std::micro>;

void blas_shape_hip(const shape& in_shape);
shape transpose_batch_hip(const shape& s, unsigned trans_batch);
MIGRAPHX_GPU_EXPORT void blas_shape_hip(const shape& in_shape);
MIGRAPHX_GPU_EXPORT shape transpose_batch_hip(const shape& s, unsigned trans_batch);

/**
* @brief Templated implementations of the compute() and finalize() methods of the Gemm operator.
Expand Down
3 changes: 2 additions & 1 deletion src/targets/gpu/include/migraphx/gpu/prepare_mlir.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#define MIGRAPHX_GUARD_GPU_PREPARE_MLIR_HPP

#include <migraphx/config.hpp>
#include <migraphx/gpu/export.h>
#include <string>

namespace migraphx {
Expand All @@ -35,7 +36,7 @@ struct module;

namespace gpu {

struct prepare_mlir
struct MIGRAPHX_GPU_EXPORT prepare_mlir
{
std::string name() const { return "gpu::prepare_mlir"; }
void apply(module& m) const;
Expand Down
Loading