Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
bc5d7f75
Commit
bc5d7f75
authored
Feb 15, 2019
by
Paul
Browse files
Merge from develop
parents
47c0854d
a5b0afa0
Changes
337
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
858 additions
and
12 deletions
+858
-12
src/targets/gpu/include/migraphx/gpu/fuse_ops.hpp
src/targets/gpu/include/migraphx/gpu/fuse_ops.hpp
+24
-0
src/targets/gpu/include/migraphx/gpu/gather.hpp
src/targets/gpu/include/migraphx/gpu/gather.hpp
+39
-0
src/targets/gpu/include/migraphx/gpu/gemm.hpp
src/targets/gpu/include/migraphx/gpu/gemm.hpp
+39
-0
src/targets/gpu/include/migraphx/gpu/hip.hpp
src/targets/gpu/include/migraphx/gpu/hip.hpp
+12
-12
src/targets/gpu/include/migraphx/gpu/leaky_relu.hpp
src/targets/gpu/include/migraphx/gpu/leaky_relu.hpp
+39
-0
src/targets/gpu/include/migraphx/gpu/log.hpp
src/targets/gpu/include/migraphx/gpu/log.hpp
+34
-0
src/targets/gpu/include/migraphx/gpu/lowering.hpp
src/targets/gpu/include/migraphx/gpu/lowering.hpp
+23
-0
src/targets/gpu/include/migraphx/gpu/lrn.hpp
src/targets/gpu/include/migraphx/gpu/lrn.hpp
+39
-0
src/targets/gpu/include/migraphx/gpu/max.hpp
src/targets/gpu/include/migraphx/gpu/max.hpp
+34
-0
src/targets/gpu/include/migraphx/gpu/min.hpp
src/targets/gpu/include/migraphx/gpu/min.hpp
+34
-0
src/targets/gpu/include/migraphx/gpu/miopen.hpp
src/targets/gpu/include/migraphx/gpu/miopen.hpp
+167
-0
src/targets/gpu/include/migraphx/gpu/mul.hpp
src/targets/gpu/include/migraphx/gpu/mul.hpp
+34
-0
src/targets/gpu/include/migraphx/gpu/oper.hpp
src/targets/gpu/include/migraphx/gpu/oper.hpp
+91
-0
src/targets/gpu/include/migraphx/gpu/pad.hpp
src/targets/gpu/include/migraphx/gpu/pad.hpp
+40
-0
src/targets/gpu/include/migraphx/gpu/pooling.hpp
src/targets/gpu/include/migraphx/gpu/pooling.hpp
+41
-0
src/targets/gpu/include/migraphx/gpu/relu.hpp
src/targets/gpu/include/migraphx/gpu/relu.hpp
+39
-0
src/targets/gpu/include/migraphx/gpu/rocblas.hpp
src/targets/gpu/include/migraphx/gpu/rocblas.hpp
+22
-0
src/targets/gpu/include/migraphx/gpu/sigmoid.hpp
src/targets/gpu/include/migraphx/gpu/sigmoid.hpp
+39
-0
src/targets/gpu/include/migraphx/gpu/sin.hpp
src/targets/gpu/include/migraphx/gpu/sin.hpp
+34
-0
src/targets/gpu/include/migraphx/gpu/sinh.hpp
src/targets/gpu/include/migraphx/gpu/sinh.hpp
+34
-0
No files found.
src/targets/gpu/include/migraph/gpu/fuse_ops.hpp
→
src/targets/gpu/include/migraph
x
/gpu/fuse_ops.hpp
View file @
bc5d7f75
#ifndef MIGRAPH_GUARD_RTGLIB_FUSE_OPS_HPP
#ifndef MIGRAPH
X
_GUARD_RTGLIB_FUSE_OPS_HPP
#define MIGRAPH_GUARD_RTGLIB_FUSE_OPS_HPP
#define MIGRAPH
X
_GUARD_RTGLIB_FUSE_OPS_HPP
#include <migraph/program.hpp>
#include <migraph
x
/program.hpp>
#include <migraph/config.hpp>
#include <migraph
x
/config.hpp>
#include <migraph/gpu/context.hpp>
#include <migraph
x
/gpu/context.hpp>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH
X
_INLINE_NS
{
namespace
gpu
{
namespace
gpu
{
...
@@ -18,7 +18,7 @@ struct fuse_ops
...
@@ -18,7 +18,7 @@ struct fuse_ops
};
};
}
// namespace gpu
}
// namespace gpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH
X
_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
#endif
src/targets/gpu/include/migraphx/gpu/gather.hpp
0 → 100644
View file @
bc5d7f75
#ifndef MIGRAPHX_GUARD_RTGLIB_GATHER_HPP
#define MIGRAPHX_GUARD_RTGLIB_GATHER_HPP
#include <migraphx/gpu/lowering.hpp>
#include <migraphx/manage_ptr.hpp>
#include <migraphx/instruction.hpp>
#include <migraphx/operators.hpp>
#include <migraphx/generate.hpp>
#include <migraphx/shape_for_each.hpp>
#include <migraphx/config.hpp>
#include <migraphx/gpu/miopen.hpp>
#include <migraphx/gpu/hip.hpp>
#include <migraphx/dfor.hpp>
#include <migraphx/gpu/device/contiguous.hpp>
#include <migraphx/gpu/device/gather.hpp>
#include <migraphx/iterator_for.hpp>
#include <migraphx/gpu/rocblas.hpp>
#include <migraphx/gpu/context.hpp>
#include <utility>
namespace
migraphx
{
inline
namespace
MIGRAPHX_INLINE_NS
{
namespace
gpu
{
struct
hip_gather
{
op
::
gather
op
;
std
::
string
name
()
const
{
return
"gpu::gather"
;
}
shape
compute_shape
(
std
::
vector
<
shape
>
inputs
)
const
;
argument
compute
(
context
&
ctx
,
const
shape
&
output_shape
,
const
std
::
vector
<
argument
>&
args
)
const
;
int
output_alias
(
const
std
::
vector
<
shape
>&
shapes
)
const
{
return
shapes
.
size
()
-
1
;
}
};
}
// namespace gpu
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace migraphx
#endif
src/targets/gpu/include/migraph/gpu/gemm.hpp
→
src/targets/gpu/include/migraph
x
/gpu/gemm.hpp
View file @
bc5d7f75
#ifndef MIGRAPH_GUARD_RTGLIB_GEMM_HPP
#ifndef MIGRAPH
X
_GUARD_RTGLIB_GEMM_HPP
#define MIGRAPH_GUARD_RTGLIB_GEMM_HPP
#define MIGRAPH
X
_GUARD_RTGLIB_GEMM_HPP
#include <migraph/gpu/lowering.hpp>
#include <migraph
x
/gpu/lowering.hpp>
#include <migraph/manage_ptr.hpp>
#include <migraph
x
/manage_ptr.hpp>
#include <migraph/instruction.hpp>
#include <migraph
x
/instruction.hpp>
#include <migraph/operators.hpp>
#include <migraph
x
/operators.hpp>
#include <migraph/generate.hpp>
#include <migraph
x
/generate.hpp>
#include <migraph/shape_for_each.hpp>
#include <migraph
x
/shape_for_each.hpp>
#include <migraph/gpu/miopen.hpp>
#include <migraph
x
/gpu/miopen.hpp>
#include <migraph/gpu/hip.hpp>
#include <migraph
x
/gpu/hip.hpp>
#include <migraph/dfor.hpp>
#include <migraph
x
/dfor.hpp>
#include <migraph/config.hpp>
#include <migraph
x
/config.hpp>
#include <migraph/gpu/device/contiguous.hpp>
#include <migraph
x
/gpu/device/contiguous.hpp>
#include <migraph/gpu/device/add.hpp>
#include <migraph
x
/gpu/device/add.hpp>
#include <migraph/iterator_for.hpp>
#include <migraph
x
/iterator_for.hpp>
#include <migraph/gpu/rocblas.hpp>
#include <migraph
x
/gpu/rocblas.hpp>
#include <migraph/gpu/context.hpp>
#include <migraph
x
/gpu/context.hpp>
#include <utility>
#include <utility>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH
X
_INLINE_NS
{
namespace
gpu
{
namespace
gpu
{
struct
miopen_gemm
struct
miopen_gemm
...
@@ -33,7 +33,7 @@ struct miopen_gemm
...
@@ -33,7 +33,7 @@ struct miopen_gemm
};
};
}
// namespace gpu
}
// namespace gpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH
X
_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
#endif
src/targets/gpu/include/migraph/gpu/hip.hpp
→
src/targets/gpu/include/migraph
x
/gpu/hip.hpp
View file @
bc5d7f75
#ifndef MIGRAPH_GUARD_MIGRAPHLIB_HIP_HPP
#ifndef MIGRAPH
X
_GUARD_MIGRAPHLIB_HIP_HPP
#define MIGRAPH_GUARD_MIGRAPHLIB_HIP_HPP
#define MIGRAPH
X
_GUARD_MIGRAPHLIB_HIP_HPP
#include <migraph/operators.hpp>
#include <migraph
x
/operators.hpp>
#include <migraph/config.hpp>
#include <migraph
x
/config.hpp>
#include <utility>
#include <utility>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH
X
_INLINE_NS
{
namespace
gpu
{
namespace
gpu
{
migraph
::
argument
allocate_gpu
(
const
migraph
::
shape
&
s
,
bool
host
=
false
);
argument
allocate_gpu
(
const
shape
&
s
,
bool
host
=
false
);
migraph
::
argument
to_gpu
(
migraph
::
argument
arg
,
bool
host
=
false
);
argument
to_gpu
(
const
argument
&
arg
,
bool
host
=
false
);
migraph
::
argument
from_gpu
(
migraph
::
argument
arg
);
argument
from_gpu
(
const
argument
&
arg
);
void
set_device
(
std
::
size_t
id
);
void
set_device
(
std
::
size_t
id
);
void
gpu_sync
();
void
gpu_sync
();
void
copy_to_gpu
(
argument
src
,
argument
dst
);
void
copy_to_gpu
(
const
argument
&
src
,
const
argument
&
dst
);
struct
hip_allocate
struct
hip_allocate
{
{
...
@@ -90,7 +90,7 @@ struct hip_copy
...
@@ -90,7 +90,7 @@ struct hip_copy
};
};
}
// namespace gpu
}
// namespace gpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH
X
_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
#endif
src/targets/gpu/include/migraph/gpu/leaky_relu.hpp
→
src/targets/gpu/include/migraph
x
/gpu/leaky_relu.hpp
View file @
bc5d7f75
#ifndef MIGRAPH_GUARD_RTGLIB_LEAKY_RELU_HPP
#ifndef MIGRAPH
X
_GUARD_RTGLIB_LEAKY_RELU_HPP
#define MIGRAPH_GUARD_RTGLIB_LEAKY_RELU_HPP
#define MIGRAPH
X
_GUARD_RTGLIB_LEAKY_RELU_HPP
#include <migraph/gpu/lowering.hpp>
#include <migraph
x
/gpu/lowering.hpp>
#include <migraph/manage_ptr.hpp>
#include <migraph
x
/manage_ptr.hpp>
#include <migraph/instruction.hpp>
#include <migraph
x
/instruction.hpp>
#include <migraph/operators.hpp>
#include <migraph
x
/operators.hpp>
#include <migraph/generate.hpp>
#include <migraph
x
/generate.hpp>
#include <migraph/shape_for_each.hpp>
#include <migraph
x
/shape_for_each.hpp>
#include <migraph/config.hpp>
#include <migraph
x
/config.hpp>
#include <migraph/gpu/miopen.hpp>
#include <migraph
x
/gpu/miopen.hpp>
#include <migraph/gpu/hip.hpp>
#include <migraph
x
/gpu/hip.hpp>
#include <migraph/dfor.hpp>
#include <migraph
x
/dfor.hpp>
#include <migraph/gpu/device/contiguous.hpp>
#include <migraph
x
/gpu/device/contiguous.hpp>
#include <migraph/gpu/device/add.hpp>
#include <migraph
x
/gpu/device/add.hpp>
#include <migraph/iterator_for.hpp>
#include <migraph
x
/iterator_for.hpp>
#include <migraph/gpu/rocblas.hpp>
#include <migraph
x
/gpu/rocblas.hpp>
#include <migraph/gpu/context.hpp>
#include <migraph
x
/gpu/context.hpp>
#include <utility>
#include <utility>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH
X
_INLINE_NS
{
namespace
gpu
{
namespace
gpu
{
struct
miopen_leaky_relu
struct
miopen_leaky_relu
...
@@ -33,7 +33,7 @@ struct miopen_leaky_relu
...
@@ -33,7 +33,7 @@ struct miopen_leaky_relu
};
};
}
// namespace gpu
}
// namespace gpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH
X
_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
#endif
src/targets/gpu/include/migraphx/gpu/log.hpp
0 → 100644
View file @
bc5d7f75
#ifndef MIGRAPHX_GUARD_RTGLIB_LOG_HPP
#define MIGRAPHX_GUARD_RTGLIB_LOG_HPP
#include <migraphx/gpu/lowering.hpp>
#include <migraphx/gpu/oper.hpp>
#include <migraphx/manage_ptr.hpp>
#include <migraphx/instruction.hpp>
#include <migraphx/operators.hpp>
#include <migraphx/generate.hpp>
#include <migraphx/shape_for_each.hpp>
#include <migraphx/gpu/miopen.hpp>
#include <migraphx/gpu/hip.hpp>
#include <migraphx/dfor.hpp>
#include <migraphx/gpu/device/contiguous.hpp>
#include <migraphx/gpu/device/log.hpp>
#include <migraphx/iterator_for.hpp>
#include <migraphx/gpu/rocblas.hpp>
#include <migraphx/gpu/context.hpp>
#include <migraphx/config.hpp>
#include <utility>
namespace
migraphx
{
inline
namespace
MIGRAPHX_INLINE_NS
{
namespace
gpu
{
struct
hip_log
:
unary_device
<
hip_log
,
device
::
log
>
{
};
}
// namespace gpu
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace migraphx
#endif
src/targets/gpu/include/migraph/gpu/lowering.hpp
→
src/targets/gpu/include/migraph
x
/gpu/lowering.hpp
View file @
bc5d7f75
#ifndef MIGRAPH_GUARD_RTGLIB_MIOPEN_LOWERING_HPP
#ifndef MIGRAPH
X
_GUARD_RTGLIB_MIOPEN_LOWERING_HPP
#define MIGRAPH_GUARD_RTGLIB_MIOPEN_LOWERING_HPP
#define MIGRAPH
X
_GUARD_RTGLIB_MIOPEN_LOWERING_HPP
#include <migraph/program.hpp>
#include <migraph
x
/program.hpp>
#include <migraph/config.hpp>
#include <migraph
x
/config.hpp>
#include <migraph/gpu/context.hpp>
#include <migraph
x
/gpu/context.hpp>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH
X
_INLINE_NS
{
namespace
gpu
{
namespace
gpu
{
struct
lowering
struct
lowering
...
@@ -17,7 +17,7 @@ struct lowering
...
@@ -17,7 +17,7 @@ struct lowering
};
};
}
// namespace gpu
}
// namespace gpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH
X
_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
#endif
src/targets/gpu/include/migraphx/gpu/lrn.hpp
0 → 100644
View file @
bc5d7f75
#ifndef MIGRAPHX_GUARD_RTGLIB_LRN_HPP
#define MIGRAPHX_GUARD_RTGLIB_LRN_HPP
#include <migraphx/gpu/lowering.hpp>
#include <migraphx/manage_ptr.hpp>
#include <migraphx/instruction.hpp>
#include <migraphx/operators.hpp>
#include <migraphx/generate.hpp>
#include <migraphx/shape_for_each.hpp>
#include <migraphx/config.hpp>
#include <migraphx/gpu/miopen.hpp>
#include <migraphx/gpu/hip.hpp>
#include <migraphx/dfor.hpp>
#include <migraphx/gpu/device/contiguous.hpp>
#include <migraphx/gpu/device/add.hpp>
#include <migraphx/iterator_for.hpp>
#include <migraphx/gpu/rocblas.hpp>
#include <migraphx/gpu/context.hpp>
#include <utility>
namespace
migraphx
{
inline
namespace
MIGRAPHX_INLINE_NS
{
namespace
gpu
{
struct
miopen_lrn
{
shared
<
lrn_descriptor
>
ldesc
;
std
::
string
name
()
const
{
return
"gpu::lrn"
;
}
shape
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
;
argument
compute
(
context
&
ctx
,
const
shape
&
output_shape
,
const
std
::
vector
<
argument
>&
args
)
const
;
int
output_alias
(
const
std
::
vector
<
shape
>&
shapes
)
const
{
return
shapes
.
size
()
-
1
;
}
};
}
// namespace gpu
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace migraphx
#endif
src/targets/gpu/include/migraphx/gpu/max.hpp
0 → 100644
View file @
bc5d7f75
#ifndef MIGRAPHX_GUARD_RTGLIB_MAX_HPP
#define MIGRAPHX_GUARD_RTGLIB_MAX_HPP
#include <migraphx/gpu/lowering.hpp>
#include <migraphx/gpu/oper.hpp>
#include <migraphx/manage_ptr.hpp>
#include <migraphx/instruction.hpp>
#include <migraphx/operators.hpp>
#include <migraphx/generate.hpp>
#include <migraphx/shape_for_each.hpp>
#include <migraphx/config.hpp>
#include <migraphx/gpu/miopen.hpp>
#include <migraphx/gpu/hip.hpp>
#include <migraphx/dfor.hpp>
#include <migraphx/gpu/device/contiguous.hpp>
#include <migraphx/gpu/device/max.hpp>
#include <migraphx/iterator_for.hpp>
#include <migraphx/gpu/rocblas.hpp>
#include <migraphx/gpu/context.hpp>
#include <utility>
namespace
migraphx
{
inline
namespace
MIGRAPHX_INLINE_NS
{
namespace
gpu
{
struct
hip_max
:
binary_device
<
hip_max
,
device
::
max
>
{
};
}
// namespace gpu
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace migraphx
#endif
src/targets/gpu/include/migraphx/gpu/min.hpp
0 → 100644
View file @
bc5d7f75
#ifndef MIGRAPHX_GUARD_RTGLIB_MIN_HPP
#define MIGRAPHX_GUARD_RTGLIB_MIN_HPP
#include <migraphx/gpu/lowering.hpp>
#include <migraphx/gpu/oper.hpp>
#include <migraphx/manage_ptr.hpp>
#include <migraphx/instruction.hpp>
#include <migraphx/operators.hpp>
#include <migraphx/generate.hpp>
#include <migraphx/shape_for_each.hpp>
#include <migraphx/config.hpp>
#include <migraphx/gpu/miopen.hpp>
#include <migraphx/gpu/hip.hpp>
#include <migraphx/dfor.hpp>
#include <migraphx/gpu/device/contiguous.hpp>
#include <migraphx/gpu/device/min.hpp>
#include <migraphx/iterator_for.hpp>
#include <migraphx/gpu/rocblas.hpp>
#include <migraphx/gpu/context.hpp>
#include <utility>
namespace
migraphx
{
inline
namespace
MIGRAPHX_INLINE_NS
{
namespace
gpu
{
struct
hip_min
:
binary_device
<
hip_min
,
device
::
min
>
{
};
}
// namespace gpu
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace migraphx
#endif
src/targets/gpu/include/migraph/gpu/miopen.hpp
→
src/targets/gpu/include/migraph
x
/gpu/miopen.hpp
View file @
bc5d7f75
#ifndef MIGRAPH_GUARD_MIGRAPHLIB_MIOPEN_HPP
#ifndef MIGRAPH
X
_GUARD_MIGRAPHLIB_MIOPEN_HPP
#define MIGRAPH_GUARD_MIGRAPHLIB_MIOPEN_HPP
#define MIGRAPH
X
_GUARD_MIGRAPHLIB_MIOPEN_HPP
#include <migraph/manage_ptr.hpp>
#include <migraph
x
/manage_ptr.hpp>
#include <migraph/operators.hpp>
#include <migraph
x
/operators.hpp>
#include <miopen/miopen.h>
#include <miopen/miopen.h>
#include <migraph/config.hpp>
#include <migraph
x
/config.hpp>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH
X
_INLINE_NS
{
namespace
gpu
{
namespace
gpu
{
using
miopen_handle
=
MIGRAPH_MANAGE_PTR
(
miopenHandle_t
,
miopenDestroy
);
using
miopen_handle
=
MIGRAPHX_MANAGE_PTR
(
miopenHandle_t
,
miopenDestroy
);
using
tensor_descriptor
=
MIGRAPH_MANAGE_PTR
(
miopenTensorDescriptor_t
,
using
tensor_descriptor
=
MIGRAPHX_MANAGE_PTR
(
miopenTensorDescriptor_t
,
miopenDestroyTensorDescriptor
);
miopenDestroyTensorDescriptor
);
using
convolution_descriptor
=
MIGRAPH_MANAGE_PTR
(
miopenConvolutionDescriptor_t
,
using
convolution_descriptor
=
MIGRAPHX_MANAGE_PTR
(
miopenConvolutionDescriptor_t
,
miopenDestroyConvolutionDescriptor
);
miopenDestroyConvolutionDescriptor
);
using
pooling_descriptor
=
MIGRAPH_MANAGE_PTR
(
miopenPoolingDescriptor_t
,
using
pooling_descriptor
=
MIGRAPHX_MANAGE_PTR
(
miopenPoolingDescriptor_t
,
miopenDestroyPoolingDescriptor
);
miopenDestroyPoolingDescriptor
);
using
activation_descriptor
=
MIGRAPH_MANAGE_PTR
(
miopenActivationDescriptor_t
,
using
activation_descriptor
=
MIGRAPHX_MANAGE_PTR
(
miopenActivationDescriptor_t
,
miopenDestroyActivationDescriptor
);
miopenDestroyActivationDescriptor
);
using
fusion_plan_descriptor
=
MIGRAPH_MANAGE_PTR
(
miopenFusionPlanDescriptor_t
,
using
fusion_plan_descriptor
=
MIGRAPHX_MANAGE_PTR
(
miopenFusionPlanDescriptor_t
,
miopenDestroyFusionPlan
);
miopenDestroyFusionPlan
);
using
fused_operator_args
=
MIGRAPH_MANAGE_PTR
(
miopenOperatorArgs_t
,
miopenDestroyOperatorArgs
);
using
fused_operator_args
=
MIGRAPHX_MANAGE_PTR
(
miopenOperatorArgs_t
,
miopenDestroyOperatorArgs
);
using
lrn_descriptor
=
MIGRAPHX_MANAGE_PTR
(
miopenLRNDescriptor_t
,
miopenDestroyLRNDescriptor
);
template
<
class
Result
,
class
F
,
class
...
Ts
>
template
<
class
Result
,
class
F
,
class
...
Ts
>
Result
make_obj
(
F
f
,
Ts
...
xs
)
Result
make_obj
(
F
f
,
Ts
...
xs
)
...
@@ -30,11 +32,11 @@ Result make_obj(F f, Ts... xs)
...
@@ -30,11 +32,11 @@ Result make_obj(F f, Ts... xs)
auto
status
=
f
(
&
x
,
xs
...);
auto
status
=
f
(
&
x
,
xs
...);
Result
r
{
x
};
Result
r
{
x
};
if
(
status
!=
miopenStatusSuccess
)
if
(
status
!=
miopenStatusSuccess
)
MIGRAPH_THROW
(
"MIOpen call failed"
);
MIGRAPH
X
_THROW
(
"MIOpen call failed"
);
return
r
;
return
r
;
}
}
inline
tensor_descriptor
make_tensor
(
const
migraph
::
shape
&
s
)
inline
tensor_descriptor
make_tensor
(
const
migraph
x
::
shape
&
s
)
{
{
auto
t
=
make_obj
<
tensor_descriptor
>
(
&
miopenCreateTensorDescriptor
);
auto
t
=
make_obj
<
tensor_descriptor
>
(
&
miopenCreateTensorDescriptor
);
// Convert to ints
// Convert to ints
...
@@ -46,26 +48,31 @@ inline tensor_descriptor make_tensor(const migraph::shape& s)
...
@@ -46,26 +48,31 @@ inline tensor_descriptor make_tensor(const migraph::shape& s)
else
if
(
s
.
type
()
==
shape
::
half_type
)
else
if
(
s
.
type
()
==
shape
::
half_type
)
d
=
miopenHalf
;
d
=
miopenHalf
;
else
else
MIGRAPH_THROW
(
"Unsupported type"
);
MIGRAPH
X
_THROW
(
"Unsupported type"
);
miopenSetTensorDescriptor
(
t
.
get
(),
d
,
s
.
lens
().
size
(),
lens
.
data
(),
strides
.
data
());
miopenSetTensorDescriptor
(
t
.
get
(),
d
,
s
.
lens
().
size
(),
lens
.
data
(),
strides
.
data
());
return
t
;
return
t
;
}
}
inline
convolution_descriptor
make_conv
(
const
migraph
::
op
::
convolution
&
op
)
inline
convolution_descriptor
make_conv
(
const
migraph
x
::
op
::
convolution
&
op
)
{
{
auto
c
=
make_obj
<
convolution_descriptor
>
(
&
miopenCreateConvolutionDescriptor
);
auto
c
=
make_obj
<
convolution_descriptor
>
(
&
miopenCreateConvolutionDescriptor
);
miopenConvolutionMode_t
c_mode
=
miopenConvolution
;
if
(
op
.
group
>
1
)
c_mode
=
miopenGroupConv
;
miopenInitConvolutionDescriptor
(
c
.
get
(),
miopenInitConvolutionDescriptor
(
c
.
get
(),
miopenConvolution
,
c_mode
,
op
.
padding
[
0
],
op
.
padding
[
0
],
op
.
padding
[
1
],
op
.
padding
[
1
],
op
.
stride
[
0
],
op
.
stride
[
0
],
op
.
stride
[
1
],
op
.
stride
[
1
],
op
.
dilation
[
0
],
op
.
dilation
[
0
],
op
.
dilation
[
1
]);
op
.
dilation
[
1
]);
if
(
op
.
group
>
1
)
miopenSetConvolutionGroupCount
(
c
.
get
(),
op
.
group
);
return
c
;
return
c
;
}
}
inline
pooling_descriptor
make_pooling
(
const
migraph
::
op
::
pooling
&
op
)
inline
pooling_descriptor
make_pooling
(
const
migraph
x
::
op
::
pooling
&
op
)
{
{
miopenPoolingMode_t
mode
;
miopenPoolingMode_t
mode
;
if
(
op
.
mode
==
"max"
)
if
(
op
.
mode
==
"max"
)
...
@@ -84,6 +91,13 @@ inline pooling_descriptor make_pooling(const migraph::op::pooling& op)
...
@@ -84,6 +91,13 @@ inline pooling_descriptor make_pooling(const migraph::op::pooling& op)
return
p
;
return
p
;
}
}
inline
lrn_descriptor
make_lrn
(
const
migraphx
::
op
::
lrn
&
op
)
{
auto
ldesc
=
make_obj
<
lrn_descriptor
>
(
&
miopenCreateLRNDescriptor
);
miopenSetLRNDescriptor
(
ldesc
.
get
(),
miopenLRNCrossChannel
,
op
.
size
,
op
.
alpha
,
op
.
beta
,
op
.
bias
);
return
ldesc
;
}
inline
activation_descriptor
make_relu
()
inline
activation_descriptor
make_relu
()
{
{
auto
ad
=
make_obj
<
activation_descriptor
>
(
&
miopenCreateActivationDescriptor
);
auto
ad
=
make_obj
<
activation_descriptor
>
(
&
miopenCreateActivationDescriptor
);
...
@@ -91,6 +105,29 @@ inline activation_descriptor make_relu()
...
@@ -91,6 +105,29 @@ inline activation_descriptor make_relu()
return
ad
;
return
ad
;
}
}
inline
activation_descriptor
make_sigmoid
()
{
auto
ad
=
make_obj
<
activation_descriptor
>
(
&
miopenCreateActivationDescriptor
);
miopenSetActivationDescriptor
(
ad
.
get
(),
miopenActivationLOGISTIC
,
0
,
0
,
0
);
return
ad
;
}
inline
activation_descriptor
make_tanh
()
{
auto
ad
=
make_obj
<
activation_descriptor
>
(
&
miopenCreateActivationDescriptor
);
// onnx operator does not apply additional scaling for tanh
// defaults for alpha and beta are therefore set to 1
miopenSetActivationDescriptor
(
ad
.
get
(),
miopenActivationTANH
,
1
,
1
,
0
);
return
ad
;
}
inline
activation_descriptor
make_abs
()
{
auto
ad
=
make_obj
<
activation_descriptor
>
(
&
miopenCreateActivationDescriptor
);
miopenSetActivationDescriptor
(
ad
.
get
(),
miopenActivationABS
,
0
,
0
,
0
);
return
ad
;
}
inline
activation_descriptor
make_leaky_relu
(
double
alpha
)
inline
activation_descriptor
make_leaky_relu
(
double
alpha
)
{
{
auto
ad
=
make_obj
<
activation_descriptor
>
(
&
miopenCreateActivationDescriptor
);
auto
ad
=
make_obj
<
activation_descriptor
>
(
&
miopenCreateActivationDescriptor
);
...
@@ -98,6 +135,13 @@ inline activation_descriptor make_leaky_relu(double alpha)
...
@@ -98,6 +135,13 @@ inline activation_descriptor make_leaky_relu(double alpha)
return
ad
;
return
ad
;
}
}
inline
activation_descriptor
make_elu
(
double
alpha
)
{
auto
ad
=
make_obj
<
activation_descriptor
>
(
&
miopenCreateActivationDescriptor
);
miopenSetActivationDescriptor
(
ad
.
get
(),
miopenActivationELU
,
alpha
,
0
,
0
);
return
ad
;
}
inline
fusion_plan_descriptor
make_fusion_plan
(
const
shape
&
input
)
inline
fusion_plan_descriptor
make_fusion_plan
(
const
shape
&
input
)
{
{
auto
t
=
make_tensor
(
input
);
auto
t
=
make_tensor
(
input
);
...
@@ -117,7 +161,7 @@ inline fused_operator_args make_fused_args()
...
@@ -117,7 +161,7 @@ inline fused_operator_args make_fused_args()
}
}
}
// namespace gpu
}
// namespace gpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH
X
_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
#endif
src/targets/gpu/include/migraphx/gpu/mul.hpp
0 → 100644
View file @
bc5d7f75
#ifndef MIGRAPHX_GUARD_RTGLIB_MUL_HPP
#define MIGRAPHX_GUARD_RTGLIB_MUL_HPP
#include <migraphx/gpu/lowering.hpp>
#include <migraphx/gpu/oper.hpp>
#include <migraphx/manage_ptr.hpp>
#include <migraphx/instruction.hpp>
#include <migraphx/operators.hpp>
#include <migraphx/generate.hpp>
#include <migraphx/shape_for_each.hpp>
#include <migraphx/config.hpp>
#include <migraphx/gpu/miopen.hpp>
#include <migraphx/gpu/hip.hpp>
#include <migraphx/dfor.hpp>
#include <migraphx/gpu/device/contiguous.hpp>
#include <migraphx/gpu/device/mul.hpp>
#include <migraphx/iterator_for.hpp>
#include <migraphx/gpu/rocblas.hpp>
#include <migraphx/gpu/context.hpp>
#include <utility>
namespace
migraphx
{
inline
namespace
MIGRAPHX_INLINE_NS
{
namespace
gpu
{
struct
hip_mul
:
binary_device
<
hip_mul
,
device
::
mul
>
{
};
}
// namespace gpu
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace migraphx
#endif
src/targets/gpu/include/migraphx/gpu/oper.hpp
0 → 100644
View file @
bc5d7f75
#ifndef MIGRAPHX_GUARD_RTGLIB_UNARY_HPP
#define MIGRAPHX_GUARD_RTGLIB_UNARY_HPP
#include <migraphx/gpu/lowering.hpp>
#include <migraphx/manage_ptr.hpp>
#include <migraphx/instruction.hpp>
#include <migraphx/operators.hpp>
#include <migraphx/generate.hpp>
#include <migraphx/shape_for_each.hpp>
#include <migraphx/gpu/miopen.hpp>
#include <migraphx/gpu/hip.hpp>
#include <migraphx/dfor.hpp>
#include <migraphx/type_name.hpp>
#include <migraphx/gpu/device/contiguous.hpp>
#include <migraphx/iterator_for.hpp>
#include <migraphx/gpu/rocblas.hpp>
#include <migraphx/gpu/context.hpp>
#include <migraphx/config.hpp>
#include <utility>
#include <iostream>
namespace
migraphx
{
inline
namespace
MIGRAPHX_INLINE_NS
{
namespace
gpu
{
template
<
class
Derived
>
struct
oper
{
std
::
string
name
()
const
{
const
std
::
string
&
name
=
get_type_name
<
Derived
>
();
// search the namespace gpu (::gpu::)
auto
pos_ns
=
name
.
find
(
"::gpu::"
);
if
(
pos_ns
!=
std
::
string
::
npos
)
{
auto
pos_name
=
name
.
find
(
"hip_"
,
pos_ns
+
std
::
string
(
"::gpu::"
).
length
());
if
(
pos_name
!=
std
::
string
::
npos
)
{
return
std
::
string
(
"gpu::"
)
+
name
.
substr
(
pos_name
+
4
);
}
else
{
return
name
.
substr
(
pos_ns
+
2
);
}
}
return
"unknown"
;
}
};
template
<
class
Derived
,
void
(
*
F
)(
hipStream_t
,
const
argument
&
,
const
argument
&
)>
struct
unary_device
:
oper
<
Derived
>
{
shape
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
{
check_shapes
{
inputs
,
*
this
}.
has
(
2
);
return
inputs
.
at
(
0
);
}
argument
compute
(
context
&
ctx
,
const
shape
&
,
const
std
::
vector
<
argument
>&
args
)
const
{
F
(
ctx
.
get_stream
().
get
(),
args
[
1
],
args
[
0
]);
return
args
[
1
];
}
int
output_alias
(
const
std
::
vector
<
shape
>&
shapes
)
const
{
return
shapes
.
size
()
-
1
;
}
};
template
<
class
Derived
,
void
(
*
F
)(
hipStream_t
,
const
argument
&
,
const
argument
&
,
const
argument
&
)>
struct
binary_device
:
oper
<
Derived
>
{
shape
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
{
check_shapes
{
inputs
,
*
this
}.
has
(
3
);
return
inputs
.
at
(
0
);
}
argument
compute
(
context
&
ctx
,
const
shape
&
,
const
std
::
vector
<
argument
>&
args
)
const
{
F
(
ctx
.
get_stream
().
get
(),
args
[
2
],
args
[
1
],
args
[
0
]);
return
args
[
2
];
}
int
output_alias
(
const
std
::
vector
<
shape
>&
shapes
)
const
{
return
shapes
.
size
()
-
1
;
}
};
}
// namespace gpu
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace migraphx
#endif
src/targets/gpu/include/migraphx/gpu/pad.hpp
0 → 100644
View file @
bc5d7f75
#ifndef MIGRAPHX_GUARD_RTGLIB_PAD_HPP
#define MIGRAPHX_GUARD_RTGLIB_PAD_HPP
#include <migraphx/gpu/lowering.hpp>
#include <migraphx/manage_ptr.hpp>
#include <migraphx/instruction.hpp>
#include <migraphx/operators.hpp>
#include <migraphx/generate.hpp>
#include <migraphx/shape_for_each.hpp>
#include <migraphx/config.hpp>
#include <migraphx/gpu/miopen.hpp>
#include <migraphx/gpu/hip.hpp>
#include <migraphx/dfor.hpp>
#include <migraphx/gpu/device/pad.hpp>
#include <migraphx/gpu/device/add.hpp>
#include <migraphx/iterator_for.hpp>
#include <migraphx/gpu/rocblas.hpp>
#include <migraphx/gpu/context.hpp>
#include <utility>
namespace
migraphx
{
inline
namespace
MIGRAPHX_INLINE_NS
{
namespace
gpu
{
struct
hip_pad
{
op
::
pad
op
;
std
::
string
name
()
const
{
return
"gpu::pad"
;
}
shape
compute_shape
(
std
::
vector
<
shape
>
inputs
)
const
;
argument
compute
(
context
&
ctx
,
const
shape
&
output_shape
,
const
std
::
vector
<
argument
>&
args
)
const
;
int
output_alias
(
const
std
::
vector
<
shape
>&
shapes
)
const
{
return
shapes
.
size
()
-
1
;
}
};
}
// namespace gpu
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace migraphx
#endif
src/targets/gpu/include/migraph/gpu/pooling.hpp
→
src/targets/gpu/include/migraph
x
/gpu/pooling.hpp
View file @
bc5d7f75
#ifndef MIGRAPH_GUARD_RTGLIB_POOLING_HPP
#ifndef MIGRAPH
X
_GUARD_RTGLIB_POOLING_HPP
#define MIGRAPH_GUARD_RTGLIB_POOLING_HPP
#define MIGRAPH
X
_GUARD_RTGLIB_POOLING_HPP
#include <migraph/gpu/lowering.hpp>
#include <migraph
x
/gpu/lowering.hpp>
#include <migraph/manage_ptr.hpp>
#include <migraph
x
/manage_ptr.hpp>
#include <migraph/instruction.hpp>
#include <migraph
x
/instruction.hpp>
#include <migraph/operators.hpp>
#include <migraph
x
/operators.hpp>
#include <migraph/generate.hpp>
#include <migraph
x
/generate.hpp>
#include <migraph/shape_for_each.hpp>
#include <migraph
x
/shape_for_each.hpp>
#include <migraph/config.hpp>
#include <migraph
x
/config.hpp>
#include <migraph/gpu/miopen.hpp>
#include <migraph
x
/gpu/miopen.hpp>
#include <migraph/gpu/hip.hpp>
#include <migraph
x
/gpu/hip.hpp>
#include <migraph/dfor.hpp>
#include <migraph
x
/dfor.hpp>
#include <migraph/gpu/device/contiguous.hpp>
#include <migraph
x
/gpu/device/contiguous.hpp>
#include <migraph/gpu/device/add.hpp>
#include <migraph
x
/gpu/device/add.hpp>
#include <migraph/iterator_for.hpp>
#include <migraph
x
/iterator_for.hpp>
#include <migraph/gpu/rocblas.hpp>
#include <migraph
x
/gpu/rocblas.hpp>
#include <migraph/gpu/context.hpp>
#include <migraph
x
/gpu/context.hpp>
#include <utility>
#include <utility>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH
X
_INLINE_NS
{
namespace
gpu
{
namespace
gpu
{
struct
miopen_pooling
struct
miopen_pooling
...
@@ -35,7 +35,7 @@ struct miopen_pooling
...
@@ -35,7 +35,7 @@ struct miopen_pooling
};
};
}
// namespace gpu
}
// namespace gpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH
X
_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
#endif
src/targets/gpu/include/migraph/gpu/relu.hpp
→
src/targets/gpu/include/migraph
x
/gpu/relu.hpp
View file @
bc5d7f75
#ifndef MIGRAPH_GUARD_RTGLIB_RELU_HPP
#ifndef MIGRAPH
X
_GUARD_RTGLIB_RELU_HPP
#define MIGRAPH_GUARD_RTGLIB_RELU_HPP
#define MIGRAPH
X
_GUARD_RTGLIB_RELU_HPP
#include <migraph/gpu/lowering.hpp>
#include <migraph
x
/gpu/lowering.hpp>
#include <migraph/manage_ptr.hpp>
#include <migraph
x
/manage_ptr.hpp>
#include <migraph/instruction.hpp>
#include <migraph
x
/instruction.hpp>
#include <migraph/operators.hpp>
#include <migraph
x
/operators.hpp>
#include <migraph/generate.hpp>
#include <migraph
x
/generate.hpp>
#include <migraph/shape_for_each.hpp>
#include <migraph
x
/shape_for_each.hpp>
#include <migraph/config.hpp>
#include <migraph
x
/config.hpp>
#include <migraph/gpu/miopen.hpp>
#include <migraph
x
/gpu/miopen.hpp>
#include <migraph/gpu/hip.hpp>
#include <migraph
x
/gpu/hip.hpp>
#include <migraph/dfor.hpp>
#include <migraph
x
/dfor.hpp>
#include <migraph/gpu/device/contiguous.hpp>
#include <migraph
x
/gpu/device/contiguous.hpp>
#include <migraph/gpu/device/add.hpp>
#include <migraph
x
/gpu/device/add.hpp>
#include <migraph/iterator_for.hpp>
#include <migraph
x
/iterator_for.hpp>
#include <migraph/gpu/rocblas.hpp>
#include <migraph
x
/gpu/rocblas.hpp>
#include <migraph/gpu/context.hpp>
#include <migraph
x
/gpu/context.hpp>
#include <utility>
#include <utility>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH
X
_INLINE_NS
{
namespace
gpu
{
namespace
gpu
{
struct
miopen_relu
struct
miopen_relu
...
@@ -33,7 +33,7 @@ struct miopen_relu
...
@@ -33,7 +33,7 @@ struct miopen_relu
};
};
}
// namespace gpu
}
// namespace gpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH
X
_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
#endif
src/targets/gpu/include/migraph/gpu/rocblas.hpp
→
src/targets/gpu/include/migraph
x
/gpu/rocblas.hpp
View file @
bc5d7f75
#ifndef MIGRAPH_GUARD_MIGRAPHLIB_ROCBLAS_HPP
#ifndef MIGRAPH
X
_GUARD_MIGRAPHLIB_ROCBLAS_HPP
#define MIGRAPH_GUARD_MIGRAPHLIB_ROCBLAS_HPP
#define MIGRAPH
X
_GUARD_MIGRAPHLIB_ROCBLAS_HPP
#include <migraph/manage_ptr.hpp>
#include <migraph
x
/manage_ptr.hpp>
#include <migraph/operators.hpp>
#include <migraph
x
/operators.hpp>
#include <migraph/config.hpp>
#include <migraph
x
/config.hpp>
#include <rocblas.h>
#include <rocblas.h>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH
X
_INLINE_NS
{
namespace
gpu
{
namespace
gpu
{
using
rocblas_handle_ptr
=
MIGRAPH_MANAGE_PTR
(
rocblas_handle
,
rocblas_destroy_handle
);
using
rocblas_handle_ptr
=
MIGRAPH
X
_MANAGE_PTR
(
rocblas_handle
,
rocblas_destroy_handle
);
rocblas_handle_ptr
create_rocblas_handle_ptr
();
rocblas_handle_ptr
create_rocblas_handle_ptr
();
rocblas_handle_ptr
create_rocblas_handle_ptr
(
hipStream_t
s
);
rocblas_handle_ptr
create_rocblas_handle_ptr
(
hipStream_t
s
);
}
// namespace gpu
}
// namespace gpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH
X
_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
#endif
src/targets/gpu/include/migraphx/gpu/sigmoid.hpp
0 → 100644
View file @
bc5d7f75
#ifndef MIGRAPHX_GUARD_RTGLIB_SIGMOID_HPP
#define MIGRAPHX_GUARD_RTGLIB_SIGMOID_HPP
#include <migraphx/gpu/lowering.hpp>
#include <migraphx/manage_ptr.hpp>
#include <migraphx/instruction.hpp>
#include <migraphx/operators.hpp>
#include <migraphx/generate.hpp>
#include <migraphx/shape_for_each.hpp>
#include <migraphx/config.hpp>
#include <migraphx/gpu/miopen.hpp>
#include <migraphx/gpu/hip.hpp>
#include <migraphx/dfor.hpp>
#include <migraphx/gpu/device/contiguous.hpp>
#include <migraphx/gpu/device/add.hpp>
#include <migraphx/iterator_for.hpp>
#include <migraphx/gpu/rocblas.hpp>
#include <migraphx/gpu/context.hpp>
#include <utility>
namespace
migraphx
{
inline
namespace
MIGRAPHX_INLINE_NS
{
namespace
gpu
{
struct
miopen_sigmoid
{
shared
<
activation_descriptor
>
ad
;
std
::
string
name
()
const
{
return
"gpu::sigmoid"
;
}
shape
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
;
argument
compute
(
context
&
ctx
,
const
shape
&
output_shape
,
const
std
::
vector
<
argument
>&
args
)
const
;
int
output_alias
(
const
std
::
vector
<
shape
>&
shapes
)
const
{
return
shapes
.
size
()
-
1
;
}
};
}
// namespace gpu
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace migraphx
#endif
src/targets/gpu/include/migraphx/gpu/sin.hpp
0 → 100644
View file @
bc5d7f75
#ifndef MIGRAPHX_GUARD_RTGLIB_SIN_HPP
#define MIGRAPHX_GUARD_RTGLIB_SIN_HPP
#include <migraphx/gpu/lowering.hpp>
#include <migraphx/gpu/oper.hpp>
#include <migraphx/manage_ptr.hpp>
#include <migraphx/instruction.hpp>
#include <migraphx/operators.hpp>
#include <migraphx/generate.hpp>
#include <migraphx/shape_for_each.hpp>
#include <migraphx/gpu/miopen.hpp>
#include <migraphx/gpu/hip.hpp>
#include <migraphx/dfor.hpp>
#include <migraphx/gpu/device/contiguous.hpp>
#include <migraphx/gpu/device/sin.hpp>
#include <migraphx/iterator_for.hpp>
#include <migraphx/gpu/rocblas.hpp>
#include <migraphx/gpu/context.hpp>
#include <migraphx/config.hpp>
#include <utility>
namespace
migraphx
{
inline
namespace
MIGRAPHX_INLINE_NS
{
namespace
gpu
{
struct
hip_sin
:
unary_device
<
hip_sin
,
device
::
sin
>
{
};
}
// namespace gpu
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace migraphx
#endif
src/targets/gpu/include/migraphx/gpu/sinh.hpp
0 → 100644
View file @
bc5d7f75
#ifndef MIGRAPHX_GUARD_RTGLIB_SINH_HPP
#define MIGRAPHX_GUARD_RTGLIB_SINH_HPP
#include <migraphx/gpu/lowering.hpp>
#include <migraphx/gpu/oper.hpp>
#include <migraphx/manage_ptr.hpp>
#include <migraphx/instruction.hpp>
#include <migraphx/operators.hpp>
#include <migraphx/generate.hpp>
#include <migraphx/shape_for_each.hpp>
#include <migraphx/gpu/miopen.hpp>
#include <migraphx/gpu/hip.hpp>
#include <migraphx/dfor.hpp>
#include <migraphx/gpu/device/contiguous.hpp>
#include <migraphx/gpu/device/sinh.hpp>
#include <migraphx/iterator_for.hpp>
#include <migraphx/gpu/rocblas.hpp>
#include <migraphx/gpu/context.hpp>
#include <migraphx/config.hpp>
#include <utility>
namespace
migraphx
{
inline
namespace
MIGRAPHX_INLINE_NS
{
namespace
gpu
{
struct
hip_sinh
:
unary_device
<
hip_sinh
,
device
::
sinh
>
{
};
}
// namespace gpu
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace migraphx
#endif
Prev
1
…
7
8
9
10
11
12
13
14
15
…
17
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment