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
0b217041
"lm_eval/tasks/nq_open/README.md" did not exist on "f88bb82710a29057b378b747e8b9cfd33a0a80e8"
Commit
0b217041
authored
Nov 27, 2018
by
Paul
Browse files
Rename more things to migraphx
parent
53fd3f74
Changes
155
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
49 additions
and
49 deletions
+49
-49
src/targets/gpu/lowering.cpp
src/targets/gpu/lowering.cpp
+2
-2
src/targets/gpu/mul.cpp
src/targets/gpu/mul.cpp
+2
-2
src/targets/gpu/pooling.cpp
src/targets/gpu/pooling.cpp
+2
-2
src/targets/gpu/relu.cpp
src/targets/gpu/relu.cpp
+2
-2
src/targets/gpu/rocblas.cpp
src/targets/gpu/rocblas.cpp
+2
-2
src/targets/gpu/sin.cpp
src/targets/gpu/sin.cpp
+2
-2
src/targets/gpu/softmax.cpp
src/targets/gpu/softmax.cpp
+2
-2
src/targets/gpu/target.cpp
src/targets/gpu/target.cpp
+2
-2
src/targets/gpu/write_literals.cpp
src/targets/gpu/write_literals.cpp
+4
-4
test/CMakeLists.txt
test/CMakeLists.txt
+10
-10
test/eliminate_allocation_test.cpp
test/eliminate_allocation_test.cpp
+1
-1
test/include/basic_ops.hpp
test/include/basic_ops.hpp
+10
-10
test/include/rob.hpp
test/include/rob.hpp
+3
-3
test/operation.cpp
test/operation.cpp
+4
-4
test/validate.cpp
test/validate.cpp
+1
-1
No files found.
src/targets/gpu/lowering.cpp
View file @
0b217041
...
...
@@ -28,7 +28,7 @@
#include <utility>
namespace
migraphx
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH
X
_INLINE_NS
{
namespace
gpu
{
struct
miopen_apply
...
...
@@ -232,5 +232,5 @@ struct miopen_apply
void
lowering
::
apply
(
program
&
p
)
const
{
miopen_apply
{
&
p
,
ctx
}.
apply
();
}
}
// namespace gpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH
X
_INLINE_NS
}
// namespace migraphx
src/targets/gpu/mul.cpp
View file @
0b217041
...
...
@@ -5,7 +5,7 @@
#include <utility>
namespace
migraphx
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH
X
_INLINE_NS
{
namespace
gpu
{
shape
hip_mul
::
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
...
...
@@ -22,5 +22,5 @@ argument hip_mul::compute(context& ctx, const shape&, const std::vector<argument
}
}
// namespace gpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH
X
_INLINE_NS
}
// namespace migraphx
src/targets/gpu/pooling.cpp
View file @
0b217041
...
...
@@ -5,7 +5,7 @@
#include <utility>
namespace
migraphx
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH
X
_INLINE_NS
{
namespace
gpu
{
shape
miopen_pooling
::
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
...
...
@@ -38,5 +38,5 @@ argument miopen_pooling::compute(context& ctx,
}
}
// namespace gpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH
X
_INLINE_NS
}
// namespace migraphx
src/targets/gpu/relu.cpp
View file @
0b217041
...
...
@@ -5,7 +5,7 @@
#include <utility>
namespace
migraphx
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH
X
_INLINE_NS
{
namespace
gpu
{
shape
miopen_relu
::
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
...
...
@@ -34,5 +34,5 @@ argument miopen_relu::compute(context& ctx,
}
}
// namespace gpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH
X
_INLINE_NS
}
// namespace migraphx
src/targets/gpu/rocblas.cpp
View file @
0b217041
#include <migraphx/gpu/rocblas.hpp>
namespace
migraphx
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH
X
_INLINE_NS
{
namespace
gpu
{
rocblas_handle_ptr
create_rocblas_handle_ptr
()
...
...
@@ -19,5 +19,5 @@ rocblas_handle_ptr create_rocblas_handle_ptr(hipStream_t s)
}
}
// namespace gpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH
X
_INLINE_NS
}
// namespace migraphx
src/targets/gpu/sin.cpp
View file @
0b217041
...
...
@@ -6,7 +6,7 @@
#include <utility>
namespace
migraphx
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH
X
_INLINE_NS
{
namespace
gpu
{
shape
hip_sin
::
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
...
...
@@ -22,5 +22,5 @@ argument hip_sin::compute(context& ctx, const shape&, const std::vector<argument
}
}
// namespace gpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH
X
_INLINE_NS
}
// namespace migraphx
src/targets/gpu/softmax.cpp
View file @
0b217041
...
...
@@ -5,7 +5,7 @@
#include <utility>
namespace
migraphx
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH
X
_INLINE_NS
{
namespace
gpu
{
shape
miopen_softmax
::
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
...
...
@@ -33,5 +33,5 @@ argument miopen_softmax::compute(context& ctx,
}
}
// namespace gpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH
X
_INLINE_NS
}
// namespace migraphx
src/targets/gpu/target.cpp
View file @
0b217041
...
...
@@ -19,7 +19,7 @@
#include <migraphx/gpu/concat_gpu_opt.hpp>
namespace
migraphx
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH
X
_INLINE_NS
{
namespace
gpu
{
std
::
vector
<
pass
>
target
::
get_passes
(
migraphx
::
context
&
gctx
)
const
...
...
@@ -61,5 +61,5 @@ std::string target::name() const { return "miopen"; }
migraphx
::
context
target
::
get_context
()
const
{
return
context
{};
}
}
// namespace gpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH
X
_INLINE_NS
}
// namespace migraphx
src/targets/gpu/write_literals.cpp
View file @
0b217041
...
...
@@ -5,10 +5,10 @@
#include <migraphx/env.hpp>
namespace
migraphx
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH
X
_INLINE_NS
{
namespace
gpu
{
MIGRAPH_DECLARE_ENV_VAR
(
MIGRAPH_COPY_LITERALS
)
MIGRAPH
X
_DECLARE_ENV_VAR
(
MIGRAPH
X
_COPY_LITERALS
)
struct
hip_load_literal
{
...
...
@@ -33,7 +33,7 @@ void write_literals::apply(program& p) const
{
if
(
ins
->
name
()
==
"@literal"
)
{
if
(
enabled
(
MIGRAPH_COPY_LITERALS
{}))
if
(
enabled
(
MIGRAPH
X
_COPY_LITERALS
{}))
{
literal
l
=
ins
->
get_literal
();
auto
pre
=
p
.
add_literal
(
l
);
...
...
@@ -53,5 +53,5 @@ void write_literals::apply(program& p) const
}
}
// namespace gpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH
X
_INLINE_NS
}
// namespace migraphx
test/CMakeLists.txt
View file @
0b217041
...
...
@@ -10,12 +10,12 @@ set(CTEST_PARALLEL_LEVEL ${N} CACHE STRING "CTest parallel level")
add_custom_target
(
check COMMAND
${
CMAKE_CTEST_COMMAND
}
--output-on-failure -j
${
CTEST_PARALLEL_LEVEL
}
-C
${
CMAKE_CFG_INTDIR
}
--timeout 1500
)
add_custom_target
(
tests
)
find_program
(
MIGRAPH_GDB gdb
)
find_program
(
MIGRAPH
X
_GDB gdb
)
if
(
MIGRAPH_GDB
)
set
(
MIGRAPH_TEST_GDB On CACHE BOOL
""
)
if
(
MIGRAPH
X
_GDB
)
set
(
MIGRAPH
X
_TEST_GDB On CACHE BOOL
""
)
else
()
set
(
MIGRAPH_TEST_GDB Off CACHE BOOL
""
)
set
(
MIGRAPH
X
_TEST_GDB Off CACHE BOOL
""
)
endif
()
set
(
SKIP_TESTS
)
...
...
@@ -34,8 +34,8 @@ function(add_test_command NAME EXE)
%1
${
ARGN
}
"
)
add_test
(
NAME
${
NAME
}
COMMAND
${
WINE_CMD
}
cmd /c
"
${
CMAKE_CURRENT_BINARY_DIR
}
/test_
${
NAME
}
.cmd"
$<TARGET_FILE:
${
EXE
}
>
)
else
()
if
(
MIGRAPH_TEST_GDB
)
# add_test(NAME ${NAME} COMMAND ${MIGRAPH_GDB}
if
(
MIGRAPH
X
_TEST_GDB
)
# add_test(NAME ${NAME} COMMAND ${MIGRAPH
X
_GDB}
# --batch
# --return-child-result
# -ex "set disable-randomization off"
...
...
@@ -54,7 +54,7 @@ function(add_test_command NAME EXE)
if(EXISTS
${
TEST_DIR
}
/core)
set(
\$
ENV{UBSAN_OPTIONS} print_stacktrace=1)
set(
\$
ENV{ASAN_OPTIONS} print_stacktrace=1)
execute_process(COMMAND
${
MIGRAPH_GDB
}
$<TARGET_FILE:
${
EXE
}
>
${
TEST_DIR
}
/core -batch -ex bt)
execute_process(COMMAND
${
MIGRAPH
X
_GDB
}
$<TARGET_FILE:
${
EXE
}
>
${
TEST_DIR
}
/core -batch -ex bt)
endif()
message(FATAL_ERROR
\"
Test failed
\"
)
endif()
...
...
@@ -95,7 +95,7 @@ foreach(TEST ${TESTS})
rocm_clang_tidy_check
(
test_
${
BASE_NAME
}
)
endforeach
()
if
(
MIGRAPH_ENABLE_GPU
)
if
(
MIGRAPH
X
_ENABLE_GPU
)
# gpu tests
file
(
GLOB GPU_TESTS gpu/*.cpp
)
...
...
@@ -142,7 +142,7 @@ function(test_headers PREFIX)
string
(
MAKE_C_IDENTIFIER
${
HEADER_REL
}
TEST_NAME
)
get_filename_component
(
BASE_NAME
${
HEADER
}
NAME_WE
)
test_header
(
header_
${
TEST_NAME
}
${
PREFIX
}
/
${
BASE_NAME
}
.hpp
)
if
(
MIGRAPH_ENABLE_GPU
)
if
(
MIGRAPH
X
_ENABLE_GPU
)
target_link_libraries
(
header_
${
TEST_NAME
}
migraphx_gpu
)
endif
()
endforeach
()
...
...
@@ -150,6 +150,6 @@ endfunction()
test_headers
(
migraphx
${
CMAKE_SOURCE_DIR
}
/src/include/migraphx/*.hpp
)
test_headers
(
migraphx/cpu
${
CMAKE_SOURCE_DIR
}
/src/targets/cpu/include/migraphx/cpu/*.hpp
)
if
(
MIGRAPH_ENABLE_GPU
)
if
(
MIGRAPH
X
_ENABLE_GPU
)
test_headers
(
migraphx/gpu
${
CMAKE_SOURCE_DIR
}
/src/targets/gpu/include/migraphx/gpu/*.hpp
)
endif
()
test/eliminate_allocation_test.cpp
View file @
0b217041
...
...
@@ -103,6 +103,6 @@ TEST_CASE(float_aligned)
int
main
(
int
argc
,
const
char
*
argv
[])
{
setenv
(
"MIGRAPH_DISABLE_MEMORY_COLORING"
,
"1"
,
1
);
setenv
(
"MIGRAPH
X
_DISABLE_MEMORY_COLORING"
,
"1"
,
1
);
test
::
run
(
argc
,
argv
);
}
test/include/basic_ops.hpp
View file @
0b217041
...
...
@@ -10,13 +10,13 @@ struct sum_op
{
migraphx
::
argument
result
;
if
(
args
.
size
()
!=
2
)
MIGRAPH_THROW
(
"Wrong args"
);
MIGRAPH
X
_THROW
(
"Wrong args"
);
if
(
args
[
0
].
get_shape
()
!=
args
[
1
].
get_shape
())
MIGRAPH_THROW
(
"Wrong args"
);
MIGRAPH
X
_THROW
(
"Wrong args"
);
if
(
args
[
0
].
get_shape
().
lens
().
size
()
!=
1
)
MIGRAPH_THROW
(
"Wrong args"
);
MIGRAPH
X
_THROW
(
"Wrong args"
);
if
(
args
[
0
].
get_shape
().
lens
().
front
()
!=
1
)
MIGRAPH_THROW
(
"Wrong args"
);
MIGRAPH
X
_THROW
(
"Wrong args"
);
args
[
0
].
visit_at
([
&
](
auto
x
)
{
args
[
1
].
visit_at
([
&
](
auto
y
)
{
result
=
migraphx
::
literal
{
x
+
y
}.
get_argument
();
});
...
...
@@ -27,7 +27,7 @@ struct sum_op
migraphx
::
shape
compute_shape
(
std
::
vector
<
migraphx
::
shape
>
inputs
)
const
{
if
(
inputs
.
size
()
!=
2
)
MIGRAPH_THROW
(
"Wrong inputs"
);
MIGRAPH
X
_THROW
(
"Wrong inputs"
);
return
inputs
.
front
();
}
};
...
...
@@ -40,13 +40,13 @@ struct minus_op
{
migraphx
::
argument
result
;
if
(
args
.
size
()
!=
2
)
MIGRAPH_THROW
(
"Wrong args"
);
MIGRAPH
X
_THROW
(
"Wrong args"
);
if
(
args
[
0
].
get_shape
()
!=
args
[
1
].
get_shape
())
MIGRAPH_THROW
(
"Wrong args"
);
MIGRAPH
X
_THROW
(
"Wrong args"
);
if
(
args
[
0
].
get_shape
().
lens
().
size
()
!=
1
)
MIGRAPH_THROW
(
"Wrong args"
);
MIGRAPH
X
_THROW
(
"Wrong args"
);
if
(
args
[
0
].
get_shape
().
lens
().
front
()
!=
1
)
MIGRAPH_THROW
(
"Wrong args"
);
MIGRAPH
X
_THROW
(
"Wrong args"
);
args
[
0
].
visit_at
([
&
](
auto
x
)
{
args
[
1
].
visit_at
([
&
](
auto
y
)
{
result
=
migraphx
::
literal
{
x
-
y
}.
get_argument
();
});
...
...
@@ -57,7 +57,7 @@ struct minus_op
migraphx
::
shape
compute_shape
(
std
::
vector
<
migraphx
::
shape
>
inputs
)
const
{
if
(
inputs
.
size
()
!=
2
)
MIGRAPH_THROW
(
"Wrong inputs"
);
MIGRAPH
X
_THROW
(
"Wrong inputs"
);
return
inputs
.
front
();
}
};
...
...
test/include/rob.hpp
View file @
0b217041
#ifndef MIGRAPH_GUARD_ROB_HPP
#define MIGRAPH_GUARD_ROB_HPP
#ifndef MIGRAPH
X
_GUARD_ROB_HPP
#define MIGRAPH
X
_GUARD_ROB_HPP
#ifdef __clang__
#pragma clang diagnostic push
...
...
@@ -30,7 +30,7 @@ struct mem_data_ptr
using
type
=
T
C
::*
;
};
#define MIGRAPH_ROB(name, Type, C, mem) \
#define MIGRAPH
X
_ROB(name, Type, C, mem) \
struct name##_tag : mem_data_ptr<C, Type> \
{ \
}; \
...
...
test/operation.cpp
View file @
0b217041
...
...
@@ -15,13 +15,13 @@ struct simple_operation
std
::
string
name
()
const
{
return
"simple"
;
}
migraphx
::
shape
compute_shape
(
const
std
::
vector
<
migraphx
::
shape
>&
)
const
{
MIGRAPH_THROW
(
"not computable"
);
MIGRAPH
X
_THROW
(
"not computable"
);
}
migraphx
::
argument
compute
(
migraphx
::
context
&
,
const
migraphx
::
shape
&
,
const
std
::
vector
<
migraphx
::
argument
>&
)
const
{
MIGRAPH_THROW
(
"not computable"
);
MIGRAPH
X
_THROW
(
"not computable"
);
}
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
simple_operation
&
op
)
{
...
...
@@ -35,13 +35,13 @@ struct simple_operation_no_print
std
::
string
name
()
const
{
return
"simple"
;
}
migraphx
::
shape
compute_shape
(
const
std
::
vector
<
migraphx
::
shape
>&
)
const
{
MIGRAPH_THROW
(
"not computable"
);
MIGRAPH
X
_THROW
(
"not computable"
);
}
migraphx
::
argument
compute
(
migraphx
::
context
&
,
const
migraphx
::
shape
&
,
const
std
::
vector
<
migraphx
::
argument
>&
)
const
{
MIGRAPH_THROW
(
"not computable"
);
MIGRAPH
X
_THROW
(
"not computable"
);
}
};
...
...
test/validate.cpp
View file @
0b217041
...
...
@@ -39,7 +39,7 @@ TEST_CASE(incomplete_args)
EXPECT
(
bool
{
p
.
validate
()
==
ins
});
}
MIGRAPH_ROB
(
access_ins_arguments
,
MIGRAPH
X
_ROB
(
access_ins_arguments
,
std
::
vector
<
migraphx
::
instruction_ref
>
,
migraphx
::
instruction
,
arguments
)
...
...
Prev
1
…
4
5
6
7
8
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