"src/nni_manager/vscode:/vscode.git/clone" did not exist on "ca99000dafd8e5bcfe9ed4af776b87753dda77d1"
Commit 6d40c8ac authored by Paul's avatar Paul
Browse files

Handle layout op

parent cf296f0c
......@@ -58,7 +58,7 @@ __global__ void ${kernel}(${params})
struct pointwise_compiler : compiler<pointwise_compiler>
{
std::vector<std::string> names() const { return {"pointwise", "contiguous"}; }
std::vector<std::string> names() const { return {"pointwise", "contiguous", "layout"}; }
static std::size_t oversubscribe_if(bool b)
{
......@@ -95,12 +95,12 @@ struct pointwise_compiler : compiler<pointwise_compiler>
compiler_replace compile(context& ctx, instruction_ref ins, const operation& op) const
{
if(op.name() == "contiguous")
if(contains({"layout", "contiguous"}, op.name()))
{
return replace(compile_op(
ctx,
to_shapes(ins->inputs()),
{{"lambda", "[](auto x) { return x; }"}, {"kernel", "contiguous_kernel"}}));
{{"lambda", "[](auto x) { return x; }"}, {"kernel", op.name()+"_kernel"}}));
}
else
{
......
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