Skip to content

Commit

Permalink
Fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
tvukovic-amd committed May 27, 2024
1 parent e3e8f07 commit 16b88cf
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 16 deletions.
17 changes: 8 additions & 9 deletions src/targets/gpu/include/migraphx/gpu/context.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
#include <migraphx/context.hpp>
#include <migraphx/gpu/miopen.hpp>
#if MIGRAPHX_USE_MIOPEN == 0
#include <hip/hip_runtime.h>
#include <hip/hip_runtime_api.h>
#include <migraphx/manage_ptr.hpp>
#include <hip/hip_runtime.h>
#include <hip/hip_runtime_api.h>
#include <migraphx/manage_ptr.hpp>
#endif
#include <migraphx/gpu/rocblas.hpp>
#include <migraphx/gpu/hip.hpp>
Expand Down Expand Up @@ -114,7 +114,6 @@ struct hip_device
return mihandle.get();
}
#endif


#if MIGRAPHX_USE_ROCBLAS
auto get_rocblas()
Expand Down Expand Up @@ -154,11 +153,11 @@ struct hip_device
}

private:
std::size_t id = 0;
shared<hip_stream_ptr> s = nullptr;
#if MIGRAPHX_USE_MIOPEN
shared<miopen_handle> mihandle = nullptr;
#endif
std::size_t id = 0;
shared<hip_stream_ptr> s = nullptr;
#if MIGRAPHX_USE_MIOPEN
shared<miopen_handle> mihandle = nullptr;
#endif
#if MIGRAPHX_USE_ROCBLAS
shared<rocblas_handle_ptr> rbhandle = nullptr;
#endif
Expand Down
1 change: 0 additions & 1 deletion src/targets/gpu/include/migraphx/gpu/miopen.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include <migraphx/op/lrn.hpp>
#include <miopen/miopen.h>


#include <sstream>

#ifdef MIGRAPHX_HAS_FIND_MODE_API
Expand Down
4 changes: 2 additions & 2 deletions src/targets/gpu/lowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ struct miopen_apply
compute_fp32 = get_compute_fp32_flag();
#endif
offload_copy = (mod == mpm->get_root_module()) ? pass->offload_copy : false;

add_extend_op("argmax");
add_extend_op("argmin");
add_extend_op("logsoftmax");
Expand All @@ -98,7 +98,7 @@ struct miopen_apply
add_extend_op("rnn_var_sl_shift_output");
add_extend_op("rnn_var_sl_shift_sequence");
add_extend_op("topk");

#if MIGRAPHX_USE_MIOPEN
add_convolution_op("convolution");
add_convolution_op("convolution_backwards");
Expand Down
3 changes: 2 additions & 1 deletion test/verify/test_conv3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
#include <migraphx/generate.hpp>
#include <migraphx/make_op.hpp>

// 3D convolution not supported in mlir due to https://github.com/ROCm/AMDMIGraphX/blob/e4013bb2a5818c4df50f51dbb310ca271f5adc69/src/targets/gpu/fuse_mlir.cpp#L259
// 3D convolution not supported in mlir due to
// https://github.com/ROCm/AMDMIGraphX/blob/e4013bb2a5818c4df50f51dbb310ca271f5adc69/src/targets/gpu/fuse_mlir.cpp#L259
#if MIGRAPHX_USE_MIOPEN
struct test_conv3d : verify_program<test_conv3d>
{
Expand Down
2 changes: 1 addition & 1 deletion test/verify/test_conv_pooling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ struct test_conv_pooling : verify_program<test_conv_pooling<DType>>
migraphx::program create_program() const
{
migraphx::program p;
auto* mm = p.get_main_module();
auto* mm = p.get_main_module();
auto input = mm->add_parameter("x", migraphx::shape{DType, {4, 3, 32, 32}});
auto weights = mm->add_parameter("w", migraphx::shape{DType, {4, 3, 3, 3}});
auto conv = mm->add_instruction(migraphx::make_op("convolution"), input, weights);
Expand Down
4 changes: 2 additions & 2 deletions test/verify/test_max_pooling_ceil_3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ struct test_max_pooling_ceil_3d : verify_program<test_max_pooling_ceil_3d<T>>
migraphx::program create_program() const
{
migraphx::program p;
auto* mm = p.get_main_module();
auto* mm = p.get_main_module();
auto input = mm->add_parameter("x", migraphx::shape{T, {1, 3, 5, 5, 5}});
auto op = migraphx::op::pooling{
auto op = migraphx::op::pooling{
migraphx::op::pooling_mode::max, {1, 1, 1}, {3, 3, 3}, {3, 3, 3}, {1, 1, 1}, true};
mm->add_instruction(op, input);
return p;
Expand Down

0 comments on commit 16b88cf

Please sign in to comment.