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
574864d8
Commit
574864d8
authored
Aug 18, 2023
by
umangyadav
Browse files
add trace_eval=3
parent
e4ef64f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
src/program.cpp
src/program.cpp
+18
-0
No files found.
src/program.cpp
View file @
574864d8
...
...
@@ -21,6 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "migraphx/file_buffer.hpp"
#include <migraphx/version.h>
#include <migraphx/compile_options.hpp>
#include <migraphx/program.hpp>
...
...
@@ -584,6 +585,23 @@ std::vector<argument> program::eval(parameter_map params, execution_environment
std
::
cout
<<
std
::
endl
;
print_statistics
(
std
::
cout
,
buffer
);
}
else
if
(
trace_level
==
3
)
{
auto
buffer_s
=
buffer
.
get_shape
();
if
(
buffer_s
.
type
()
!=
shape
::
tuple_type
)
{
auto
std_buffer
=
buffer
;
if
(
not
buffer_s
.
standard
())
{
std_buffer
=
migraphx
::
make_op
(
"contiguous"
)
.
compute
(
shape
{
buffer_s
.
type
(),
buffer_s
.
lens
()},
{
buffer
});
}
std
::
vector
<
char
>
binary_vec
(
std_buffer
.
data
(),
std_buffer
.
data
()
+
std_buffer
.
get_shape
().
bytes
());
write_buffer
(
ins_out
.
at
(
ins
)
+
".bin"
,
binary_vec
);
}
}
else
{
std
::
cout
<<
"Output: "
<<
buffer
<<
std
::
endl
;
...
...
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