Skip to content

Commit

Permalink
53merge v2 (#1357)
Browse files Browse the repository at this point in the history
* Fix json strings in driver models (#1341)
* fix bug size_t -> std::size_t (#1350)
* Fix test suite compile in Ubuntu 22.04 (#1353)
* onnxruntime renamed master to main (#1336)

Co-authored-by: kahmed10 <[email protected]>
Co-authored-by: Charlie Lin <[email protected]>
  • Loading branch information
3 people authored Aug 26, 2022
1 parent 5bf4dee commit 9a1ada1
Show file tree
Hide file tree
Showing 9 changed files with 3,940 additions and 2,840 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ RUN cget -p $PREFIX install [email protected]
RUN cget -p /opt/cmake install kitware/[email protected]

ARG ONNXRUNTIME_REPO=https://github.com/Microsoft/onnxruntime
ARG ONNXRUNTIME_BRANCH=master
ARG ONNXRUNTIME_BRANCH=main
ARG ONNXRUNTIME_COMMIT=24f1bd6156cf5968bbc76dfb0e801a9b9c56b9fc
RUN git clone --single-branch --branch ${ONNXRUNTIME_BRANCH} --recursive ${ONNXRUNTIME_REPO} onnxruntime && \
cd onnxruntime && \
Expand Down
227 changes: 99 additions & 128 deletions src/driver/alexnet.cpp

Large diffs are not rendered by default.

4,240 changes: 2,468 additions & 1,772 deletions src/driver/inceptionv3.cpp

Large diffs are not rendered by default.

2,290 changes: 1,355 additions & 935 deletions src/driver/resnet50.cpp

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/include/migraphx/make_op.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
#include <migraphx/config.hpp>
#include <migraphx/operation.hpp>
#include <migraphx/value.hpp>
#include <migraphx/json.hpp>
#include <migraphx/convert_to_json.hpp>

namespace migraphx {
inline namespace MIGRAPHX_INLINE_NS {
Expand All @@ -46,6 +48,8 @@ operation make_op(const std::string& name, const Value& v)
return make_op_from_value(name, v);
}

operation make_json_op(const std::string& name, const std::string& s);

} // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx

Expand Down
1 change: 1 addition & 0 deletions src/include/migraphx/target_assignments.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#define MIGRAPHX_GUARD_MIGRAPHX_ASSIGNMENT_HPP

#include <unordered_map>
#include <string>

#include <migraphx/instruction_ref.hpp>

Expand Down
5 changes: 5 additions & 0 deletions src/make_op.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,10 @@ operation make_op_from_value(const std::string& name, const value& v)
});
}

operation make_json_op(const std::string& name, const std::string& s)
{
return make_op(name, from_json_string(convert_to_json(s)));
}

} // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx
9 changes: 6 additions & 3 deletions src/module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -788,12 +788,15 @@ static std::string cpp_var_name(const std::string& name)

static void print_make_op(std::ostream& os, const operation& op)
{
os << "migraphx::make_op(" << enclose_name(op.name());
auto v = op.to_value();
if(not v.empty())
{
os << ", "
<< "migraphx::from_json_string(" << enclose_name(to_json_string(v)) << ")";
os << "migraphx::make_json_op(" << enclose_name(op.name());
os << ", " << enclose_name(to_json_string(v));
}
else
{
os << "migraphx::make_op(" << enclose_name(op.name());
}
os << ")";
}
Expand Down
2 changes: 1 addition & 1 deletion src/pad_calc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ std::vector<std::size_t> calc_dyn_auto_pad(std::vector<std::size_t> tensor_lens,
{
std::vector<std::size_t> padding;
padding.resize(2 * k_lens.size());
for(size_t i = 0; i < padding.size() / 2; i++)
for(std::size_t i = 0; i < padding.size() / 2; i++)
{
std::ptrdiff_t input_dim = tensor_lens[i];
std::ptrdiff_t stride = strides[i];
Expand Down

0 comments on commit 9a1ada1

Please sign in to comment.