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
68189043
Unverified
Commit
68189043
authored
Jul 11, 2022
by
Paul Fultz II
Committed by
GitHub
Jul 11, 2022
Browse files
Use current device when constructng context (#1294)
parent
2781ccd8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
src/targets/gpu/include/migraphx/gpu/device_name.hpp
src/targets/gpu/include/migraphx/gpu/device_name.hpp
+2
-0
src/targets/gpu/target.cpp
src/targets/gpu/target.cpp
+2
-1
No files found.
src/targets/gpu/include/migraphx/gpu/device_name.hpp
View file @
68189043
...
@@ -33,6 +33,8 @@ namespace gpu {
...
@@ -33,6 +33,8 @@ namespace gpu {
std
::
string
get_device_name
();
std
::
string
get_device_name
();
int
get_device_id
();
}
// namespace gpu
}
// namespace gpu
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace migraphx
}
// namespace migraphx
...
...
src/targets/gpu/target.cpp
View file @
68189043
...
@@ -53,6 +53,7 @@
...
@@ -53,6 +53,7 @@
#include <migraphx/gpu/compile_ops.hpp>
#include <migraphx/gpu/compile_ops.hpp>
#include <migraphx/gpu/concat_gpu_opt.hpp>
#include <migraphx/gpu/concat_gpu_opt.hpp>
#include <migraphx/gpu/context.hpp>
#include <migraphx/gpu/context.hpp>
#include <migraphx/gpu/device_name.hpp>
#include <migraphx/gpu/fuse_mlir.hpp>
#include <migraphx/gpu/fuse_mlir.hpp>
#include <migraphx/gpu/fuse_ops.hpp>
#include <migraphx/gpu/fuse_ops.hpp>
#include <migraphx/gpu/prefuse_ops.hpp>
#include <migraphx/gpu/prefuse_ops.hpp>
...
@@ -162,7 +163,7 @@ std::vector<pass> target::get_passes(migraphx::context& gctx, const compile_opti
...
@@ -162,7 +163,7 @@ std::vector<pass> target::get_passes(migraphx::context& gctx, const compile_opti
std
::
string
target
::
name
()
const
{
return
"gpu"
;
}
std
::
string
target
::
name
()
const
{
return
"gpu"
;
}
migraphx
::
context
target
::
get_context
()
const
{
return
context
{}
;
}
migraphx
::
context
target
::
get_context
()
const
{
return
context
(
gpu
::
get_device_id
())
;
}
argument
target
::
copy_to
(
const
argument
&
arg
)
const
{
return
gpu
::
to_gpu
(
arg
);
}
argument
target
::
copy_to
(
const
argument
&
arg
)
const
{
return
gpu
::
to_gpu
(
arg
);
}
...
...
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