"git@developer.sourcefind.cn:gaoqiong/migraphx.git" did not exist on "834255a3c03f152bbcfcc9858396c147f23991f1"
Commit f050afb7 authored by Paul's avatar Paul
Browse files

Use out own passthrough to workaround ck issues

parent 9c3073bd
This diff is collapsed.
...@@ -82,5 +82,14 @@ struct ck_nop ...@@ -82,5 +82,14 @@ struct ck_nop
} }
}; };
struct ck_passthrough
{
template <class T, class U>
constexpr void operator()(T& y , U x) const
{
y = x;
}
};
} // namespace migraphx } // namespace migraphx
#endif // MIGRAPHX_GUARD_KERNELS_CK_HPP #endif // MIGRAPHX_GUARD_KERNELS_CK_HPP
...@@ -75,10 +75,10 @@ def parse_log(f): ...@@ -75,10 +75,10 @@ def parse_log(f):
yield config yield config
def benchmark_log(f): def benchmark_log(f, n):
result = [] result = []
for config in parse_log(f): for config in parse_log(f):
tuned = benchmark(config, 13) tuned = benchmark(config, n)
result.append([config, tuned]) result.append([config, tuned])
return result return result
...@@ -95,12 +95,15 @@ def parse_args(): ...@@ -95,12 +95,15 @@ def parse_args():
type=str, type=str,
metavar='file', metavar='file',
help='Output json file to save tunings') help='Output json file to save tunings')
parser.add_argument('-n',
type=int,
help='Number of instances to tune')
args = parser.parse_args() args = parser.parse_args()
return args return args
def run(args): def run(args):
tuned = benchmark_log(args.log) tuned = benchmark_log(args.log, args.n)
json.dump(tuned, open(args.out, 'w+')) json.dump(tuned, open(args.out, 'w+'))
......
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