forked from mindspore-Ecosystem/mindspore
upgrade_ascend_20230222_master
This commit is contained in:
parent
5a08aa6753
commit
224c726d82
|
@ -1 +1 @@
|
|||
Subproject commit 0ef64f22a5e5ca99c89c8753548cc53e8aeae0ae
|
||||
Subproject commit 333eb9e71edfbcc698a6eb125627f6e38f9b72c4
|
|
@ -295,6 +295,15 @@ void TbeKernelCompileManager::ParseTargetJobStatus(const nlohmann::json &json, T
|
|||
}
|
||||
}
|
||||
|
||||
std::string TbeKernelCompileManager::ParseOpPattern(const std::string &json_str) const {
|
||||
nlohmann::json result;
|
||||
if (!ParseJson(json_str, &result)) {
|
||||
MS_LOG(WARNING) << "Parse op pattern json error. Origin result: " << json_str;
|
||||
return kernel::kPatternOpaque;
|
||||
}
|
||||
return GetJsonValue<std::string>(result, "pattern");
|
||||
}
|
||||
|
||||
nlohmann::json TbeKernelCompileManager::TurnStrToJson(const std::string &string) const {
|
||||
nlohmann::json json;
|
||||
if (!ParseJson(string, &json)) {
|
||||
|
@ -372,7 +381,7 @@ void TbeKernelCompileManager::SavePreBuildResult(const std::string &json_name, c
|
|||
MS_LOG(WARNING) << "Parse pre-build result error. Origin result: " << pre_build_result;
|
||||
return;
|
||||
}
|
||||
auto op_pattern = GetJsonValue<std::string>(result, "op_pattern");
|
||||
auto op_pattern = ParseOpPattern(GetJsonValue<std::string>(result, "op_pattern"));
|
||||
auto output_data_desc = GetJsonValue<nlohmann::json>(result, "op_params");
|
||||
auto core_type = GetJsonValue<nlohmann::json>(result, "core_type");
|
||||
// save pre build result
|
||||
|
|
|
@ -117,6 +117,7 @@ class TbeKernelCompileManager {
|
|||
void PrintCompileResult(const nlohmann::json &json);
|
||||
std::string ParseSelectAndCheckResult(const nlohmann::json &json, const CNodePtr &node) const;
|
||||
void ParseTargetJobStatus(const nlohmann::json &json, TargetJobStatus *target_status) const;
|
||||
std::string ParseOpPattern(const std::string &json_str) const;
|
||||
nlohmann::json TurnStrToJson(const std::string &string) const;
|
||||
void SaveIOSizeInfo(const nlohmann::json &json, const std::string &json_name,
|
||||
const std::vector<AnfNodePtr> &output_nodes = {});
|
||||
|
|
|
@ -491,7 +491,7 @@ void TbeUtils::GetCompileInfo(const AnfNodePtr &node, std::string *compile_info,
|
|||
if (!ParseJson(build_res_str, &build_res_json)) {
|
||||
MS_LOG(EXCEPTION) << "Parse build result for " << node->fullname_with_scope() << " error :" << build_res_str;
|
||||
}
|
||||
*compile_info = build_res_json.dump();
|
||||
*compile_info = read_new_json.at("compileInfo").dump();
|
||||
file.close();
|
||||
file.clear();
|
||||
MS_LOG(DEBUG) << "Get compile info from json file success.";
|
||||
|
|
|
@ -178,7 +178,7 @@ class ReluReduceMeanDenseRelu(Cell):
|
|||
return x_
|
||||
|
||||
|
||||
@pytest.mark.level0
|
||||
@pytest.mark.level1
|
||||
@pytest.mark.platform_arm_ascend_training
|
||||
@pytest.mark.platform_x86_ascend_training
|
||||
@pytest.mark.env_onecard
|
||||
|
|
|
@ -177,7 +177,7 @@ def train(batch_size, lr, momentum, epochs, dataset_sink_mode):
|
|||
return avg_loss
|
||||
|
||||
|
||||
@pytest.mark.level0
|
||||
@pytest.mark.level1
|
||||
@pytest.mark.platform_arm_ascend_training
|
||||
@pytest.mark.platform_x86_ascend_training
|
||||
@pytest.mark.env_onecard
|
||||
|
|
|
@ -76,7 +76,7 @@ def test_convert_attr_to_input():
|
|||
utils.run_testcase('pass_convert_attr_to_input')
|
||||
|
||||
|
||||
@pytest.mark.level0
|
||||
@pytest.mark.level1
|
||||
@pytest.mark.platform_arm_ascend_training
|
||||
@pytest.mark.platform_x86_ascend_training
|
||||
@pytest.mark.env_onecard
|
||||
|
|
|
@ -321,7 +321,7 @@ class MaxPool(nn.Cell):
|
|||
return out
|
||||
|
||||
|
||||
@pytest.mark.level0
|
||||
@pytest.mark.level1
|
||||
@pytest.mark.platform_arm_ascend_training
|
||||
@pytest.mark.platform_x86_ascend_training
|
||||
@pytest.mark.env_onecard
|
||||
|
|
|
@ -428,7 +428,7 @@ def test_tesnsor_augassign_by_tensor():
|
|||
|
||||
|
||||
# GPU: does not supported op "FloorMod"
|
||||
@pytest.mark.level0
|
||||
@pytest.mark.level1
|
||||
@pytest.mark.platform_arm_ascend_training
|
||||
@pytest.mark.platform_x86_ascend_training
|
||||
@pytest.mark.env_onecard
|
||||
|
|
|
@ -24,7 +24,7 @@ class Net(nn.Cell):
|
|||
return x.logsumexp(dim, keepdim=True)
|
||||
|
||||
|
||||
@pytest.mark.level0
|
||||
@pytest.mark.level1
|
||||
@pytest.mark.platform_x86_cpu
|
||||
@pytest.mark.platform_arm_cpu
|
||||
@pytest.mark.platform_x86_gpu_training
|
||||
|
|
Loading…
Reference in New Issue