"src/tl_templates/vscode:/vscode.git/clone" did not exist on "c5bbc608555014e7b0b7108bc0a5eebb1522768f"
Commit b44e948d authored by Artur Wojcik's avatar Artur Wojcik
Browse files

workaround

parent 75d91980
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
*/ */
#include <migraphx/cpu/lowering.hpp> #include <migraphx/cpu/lowering.hpp>
#if !defined(_MSC_VER)
#include <migraphx/instruction.hpp> #include <migraphx/instruction.hpp>
#include <migraphx/dfor.hpp> #include <migraphx/dfor.hpp>
#include <migraphx/op/identity.hpp> #include <migraphx/op/identity.hpp>
...@@ -51,12 +52,15 @@ ...@@ -51,12 +52,15 @@
#include <migraphx/cpu/context.hpp> #include <migraphx/cpu/context.hpp>
#include <migraphx/register_op.hpp> #include <migraphx/register_op.hpp>
#include <migraphx/make_op.hpp> #include <migraphx/make_op.hpp>
#endif
#include <migraphx/program.hpp> #include <migraphx/program.hpp>
#if !defined(_MSC_VER)
#include <migraphx/tune_axis.hpp> #include <migraphx/tune_axis.hpp>
#include <migraphx/match/layernorm.hpp> #include <migraphx/match/layernorm.hpp>
#include <migraphx/match/gelu_erf.hpp> #include <migraphx/match/gelu_erf.hpp>
#include <migraphx/match/gelu_tanh.hpp> #include <migraphx/match/gelu_tanh.hpp>
#include <migraphx/matcher.hpp> #include <migraphx/matcher.hpp>
#endif
#include <unordered_map> #include <unordered_map>
#include <utility> #include <utility>
#include <iostream> #include <iostream>
...@@ -65,6 +69,7 @@ namespace migraphx { ...@@ -65,6 +69,7 @@ namespace migraphx {
inline namespace MIGRAPHX_INLINE_NS { inline namespace MIGRAPHX_INLINE_NS {
namespace cpu { namespace cpu {
#if !defined(_MSC_VER)
template <typename T> template <typename T>
T zero(const T&) T zero(const T&)
{ {
...@@ -445,8 +450,14 @@ struct cpu_apply ...@@ -445,8 +450,14 @@ struct cpu_apply
return modl->insert_instruction(ins, make_op("allocate", {{"shape", to_value(s)}})); return modl->insert_instruction(ins, make_op("allocate", {{"shape", to_value(s)}}));
} }
}; };
#endif
void lowering::apply(module& m) const { cpu_apply{&m}.apply(); } void lowering::apply(module& m) const
{
#if !defined(_MSC_VER)
cpu_apply{&m}.apply();
#endif
}
} // namespace cpu } // namespace cpu
} // namespace MIGRAPHX_INLINE_NS } // namespace MIGRAPHX_INLINE_NS
......
...@@ -23,16 +23,22 @@ ...@@ -23,16 +23,22 @@
*/ */
#include <migraphx/permutation.hpp> #include <migraphx/permutation.hpp>
#include <migraphx/gpu/prefuse_ops.hpp> #include <migraphx/gpu/prefuse_ops.hpp>
#if !defined(_MSC_VER)
#include <migraphx/match/layernorm.hpp> #include <migraphx/match/layernorm.hpp>
#include <migraphx/check_shapes.hpp> #include <migraphx/check_shapes.hpp>
#include <migraphx/make_op.hpp> #include <migraphx/make_op.hpp>
#include <migraphx/register_op.hpp> #include <migraphx/register_op.hpp>
#endif
#include <migraphx/pass_manager.hpp> #include <migraphx/pass_manager.hpp>
#if !defined(_MSC_VER)
#include <migraphx/dead_code_elimination.hpp> #include <migraphx/dead_code_elimination.hpp>
#endif
namespace migraphx { namespace migraphx {
inline namespace MIGRAPHX_INLINE_NS { inline namespace MIGRAPHX_INLINE_NS {
namespace gpu { namespace gpu {
#if !defined(_MSC_VER)
namespace { namespace {
template <class Derived, std::size_t N> template <class Derived, std::size_t N>
...@@ -121,12 +127,15 @@ struct find_add_layernorm ...@@ -121,12 +127,15 @@ struct find_add_layernorm
} }
}; };
} // namespace } // namespace
#endif
void prefuse_ops::apply(module_pass_manager& mpm) const void prefuse_ops::apply(module_pass_manager& mpm) const
{ {
#if !defined(_MSC_VER)
match::find_matches(mpm.get_module(), find_layernorm{}); match::find_matches(mpm.get_module(), find_layernorm{});
mpm.run_pass(dead_code_elimination{}); mpm.run_pass(dead_code_elimination{});
match::find_matches(mpm.get_module(), find_add_layernorm{}); match::find_matches(mpm.get_module(), find_add_layernorm{});
#endif
} }
} // namespace gpu } // namespace gpu
......
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