Skip to content

Commit

Permalink
Reverted names i.e., mlir_offload.hpp to fuse_mlir.hpp
Browse files Browse the repository at this point in the history
  • Loading branch information
ravil-mobile committed Aug 30, 2023
1 parent 6d38378 commit 4da4a3e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/targets/gpu/fuse_mlir.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* THE SOFTWARE.
*/
#include "migraphx/shape.hpp"
#include <migraphx/gpu/mlir_offload.hpp>
#include <migraphx/gpu/fuse_mlir.hpp>
#include <migraphx/gpu/mlir.hpp>
#include <migraphx/matcher.hpp>
#include <migraphx/pass_manager.hpp>
Expand Down Expand Up @@ -362,7 +362,7 @@ bool is_standalone_convs_enabled(const std::string& gfx_name)

#endif // MIGRAPHX_MLIR

void mlir_offload::apply(module_pass_manager& mpm) const
void fuse_mlir::apply(module_pass_manager& mpm) const
{
#ifdef MIGRAPHX_MLIR
if(is_fusion_enabled())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef MIGRAPHX_GUARD_GPU_MLIR_OFFLOAD_HPP
#define MIGRAPHX_GUARD_GPU_MLIR_OFFLOAD_HPP
#ifndef MIGRAPHX_GUARD_GPU_FUSE_MLIR_HPP
#define MIGRAPHX_GUARD_GPU_FUSE_MLIR_HPP

#include <migraphx/gpu/context.hpp>

Expand All @@ -35,15 +35,15 @@ namespace gpu {

MIGRAPHX_GPU_EXPORT bool mlir_enabled();

struct MIGRAPHX_GPU_EXPORT mlir_offload
struct MIGRAPHX_GPU_EXPORT fuse_mlir
{
context* ctx = nullptr;
std::string name() const { return "gpu::mlir_offload"; }
std::string name() const { return "gpu::fuse_mlir"; }
void apply(module_pass_manager& mpm) const;
};

} // namespace gpu

} // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx
#endif // MIGRAPHX_GUARD_GPU_MLIR_OFFLOAD_HPP
#endif // MIGRAPHX_GUARD_GPU_FUSE_MLIR_HPP

Check warning on line 49 in src/targets/gpu/include/migraphx/gpu/fuse_mlir.hpp

View workflow job for this annotation

GitHub Actions / tidy

no newline at end of file [clang-diagnostic-newline-eof,-warnings-as-errors]

Check warning on line 49 in src/targets/gpu/include/migraphx/gpu/fuse_mlir.hpp

View workflow job for this annotation

GitHub Actions / tidy

no newline at end of file [clang-diagnostic-newline-eof,-warnings-as-errors]

Check warning on line 49 in src/targets/gpu/include/migraphx/gpu/fuse_mlir.hpp

View workflow job for this annotation

GitHub Actions / tidy

no newline at end of file [clang-diagnostic-newline-eof,-warnings-as-errors]

Check warning on line 49 in src/targets/gpu/include/migraphx/gpu/fuse_mlir.hpp

View workflow job for this annotation

GitHub Actions / tidy

no newline at end of file [clang-diagnostic-newline-eof,-warnings-as-errors]
4 changes: 2 additions & 2 deletions src/targets/gpu/target.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
#include <migraphx/gpu/context.hpp>
#include <migraphx/gpu/device_name.hpp>
#include <migraphx/gpu/fuse_ck.hpp>
#include <migraphx/gpu/mlir_offload.hpp>
#include <migraphx/gpu/fuse_mlir.hpp>
#include <migraphx/gpu/fuse_ops.hpp>
#include <migraphx/gpu/prefuse_ops.hpp>
#include <migraphx/gpu/lowering.hpp>
Expand Down Expand Up @@ -142,7 +142,7 @@ std::vector<pass> target::get_passes(migraphx::context& gctx, const compile_opti
enable_pass(enabled(MIGRAPHX_ENABLE_CK{}), fuse_ck{}),
#endif
dead_code_elimination{},
enable_pass(mlir_enabled(), mlir_offload{&ctx}),
enable_pass(mlir_enabled(), fuse_mlir{&ctx}),
dead_code_elimination{},
lowering{&ctx, options.offload_copy},
eliminate_contiguous{"gpu::contiguous"},
Expand Down
4 changes: 2 additions & 2 deletions test/gpu/fuse_mlir.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* THE SOFTWARE.
*/
#include <migraphx/dead_code_elimination.hpp>
#include <migraphx/gpu/mlir_offload.hpp>
#include <migraphx/gpu/fuse_mlir.hpp>
#include <migraphx/instruction.hpp>
#include <migraphx/pass_manager.hpp>
#include <migraphx/program.hpp>
Expand All @@ -34,7 +34,7 @@

void run_pass(migraphx::program& p)
{
migraphx::run_passes(p, {migraphx::gpu::mlir_offload{}, migraphx::dead_code_elimination{}});
migraphx::run_passes(p, {migraphx::gpu::fuse_mlir{}, migraphx::dead_code_elimination{}});
}

template <class F>
Expand Down
2 changes: 1 addition & 1 deletion test/gpu/quantization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
#include <iostream>
#include <vector>
#include <migraphx/gpu/mlir_offload.hpp>
#include <migraphx/gpu/fuse_mlir.hpp>
#include <migraphx/make_op.hpp>
#include <migraphx/instruction.hpp>
#include <migraphx/quantization.hpp>
Expand Down

0 comments on commit 4da4a3e

Please sign in to comment.