"git@developer.sourcefind.cn:gaoqiong/migraphx.git" did not exist on "40595b78c4dc0acbb89f1d70f223baa9efa42a9f"
Commit e3d0c287 authored by Alan Turner's avatar Alan Turner
Browse files

Formatting

parent 123c69b7
...@@ -155,8 +155,7 @@ struct ck_gemm_softmax_gemm_compiler : compiler<ck_gemm_softmax_gemm_compiler> ...@@ -155,8 +155,7 @@ struct ck_gemm_softmax_gemm_compiler : compiler<ck_gemm_softmax_gemm_compiler>
{ {
static std::string get_layout(const shape& s) static std::string get_layout(const shape& s)
{ {
return s.strides().back() == 1 return s.strides().back() == 1 ? "ck::tensor_layout::gemm::RowMajor"
? "ck::tensor_layout::gemm::RowMajor"
: "ck::tensor_layout::gemm::ColumnMajor"; : "ck::tensor_layout::gemm::ColumnMajor";
} }
......
...@@ -40,9 +40,11 @@ def tune_models(models, batch_sizes, seq_len, n, existing): ...@@ -40,9 +40,11 @@ def tune_models(models, batch_sizes, seq_len, n, existing):
json_file = "ck_tuning_{}.json".format(time_stamp) json_file = "ck_tuning_{}.json".format(time_stamp)
for model in models: for model in models:
for batch in batch_sizes: for batch in batch_sizes:
params = "--input-dim @sample {} 4 64 64 @timestep 1 @encoder_hidden_states {} 64 1024 --fp16 ".format(batch, batch) params = "--input-dim @sample {} 4 64 64 @timestep 1 @encoder_hidden_states {} 64 1024 --fp16 ".format(
batch, batch)
if "bert" in model: if "bert" in model:
params = "--fill1 input_ids --input-dim @input_ids {} {} ".format(batch, seq_len) params = "--fill1 input_ids --input-dim @input_ids {} {} ".format(
batch, seq_len)
out = subprocess.run( out = subprocess.run(
'MIGRAPHX_LOG_CK_GEMM=1 ../build/bin/driver run {} -g {} | grep \'ck_gemm.*: \[{{\' | sort -u >> {}' 'MIGRAPHX_LOG_CK_GEMM=1 ../build/bin/driver run {} -g {} | grep \'ck_gemm.*: \[{{\' | sort -u >> {}'
.format(model, params, log_file), .format(model, params, log_file),
......
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