"examples/vscode:/vscode.git/clone" did not exist on "bd0bd7ef2cdd81ad60022607af723b257ee4f7a4"
Unverified Commit e521fa3f authored by Paul Fultz II's avatar Paul Fultz II Committed by GitHub
Browse files

Make get_context experimental (#1137)

The get_context may change in the future(when we support multi-targets) so make this experimental for now.
parent 64e79a94
......@@ -1102,8 +1102,8 @@ migraphx_program_equal(bool* out, const_migraphx_program_t program, const_migrap
return api_error_result;
}
extern "C" migraphx_status migraphx_program_get_context(migraphx_context_t* out,
const_migraphx_program_t program)
extern "C" migraphx_status
migraphx_program_experimental_get_context(migraphx_context_t* out, const_migraphx_program_t program)
{
auto api_error_result = migraphx::try_([&] {
if(program == nullptr)
......
......@@ -291,7 +291,7 @@ migraphx_status migraphx_program_run(migraphx_arguments_t* out,
migraphx_status
migraphx_program_equal(bool* out, const_migraphx_program_t program, const_migraphx_program_t x);
migraphx_status migraphx_program_get_context(migraphx_context_t* out,
migraphx_status migraphx_program_experimental_get_context(migraphx_context_t* out,
const_migraphx_program_t program);
migraphx_status migraphx_operation_destroy(migraphx_operation_t operation);
......
......@@ -733,10 +733,10 @@ struct program : MIGRAPHX_HANDLE_BASE(program)
return module{p_modu};
}
context get_context()
context experimental_get_context()
{
migraphx_context_t ctx;
call(&migraphx_program_get_context, &ctx, this->get_handle_ptr());
call(&migraphx_program_experimental_get_context, &ctx, this->get_handle_ptr());
return context{ctx};
}
......
......@@ -248,7 +248,7 @@ def program(h):
invoke='migraphx::equal($@)',
returns='bool',
const=True)
h.method('get_context',
h.method('experimental_get_context',
invoke='migraphx::get_context($@)',
const=True,
returns='migraphx::context')
......
......@@ -461,8 +461,8 @@ lifetime get_lifetime_op(const T&)
* shape compute_shape(const std::vector<shape>& input) const;
* shape compute_shape(const std::vector<shape>& inputs,const std::vector<module_ref>&
* mod_args) const; argument compute(context& ctx,const shape& output,const std::vector<argument>&
* input) const; argument compute(const shape& output,const std::vector<argument>& input)
* const; argument compute(const shape& output,const std::vector<argument>& input,const
* input) const; argument compute(const shape& output,const std::vector<argument>& input) const;
* argument compute(const shape& output,const std::vector<argument>& input,const
* std::vector<module_ref>& module_args,std::function<std::vector<argument>(module_ref&, const
* std::unordered_map<std::string, argument>&)> run) const; argument compute(context& ctx,const
* shape& output,const std::vector<argument>& input,const std::vector<module_ref>&
......
......@@ -37,7 +37,7 @@ TEST_CASE(load_and_run_ctx)
{
pp.add(name, migraphx::argument::generate(param_shapes[name]));
}
auto ctx = p.get_context();
auto ctx = p.experimental_get_context();
p.eval(pp);
ctx.finish();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment