modify dev env name
Signed-off-by: zhoufeng <zhoufeng54@huawei.com>
This commit is contained in:
parent
cdeffda907
commit
9d432d029d
|
@ -160,6 +160,8 @@
|
|||
namespace mindspore {
|
||||
namespace opt {
|
||||
namespace {
|
||||
constexpr char kDisablePrebuildEnv[] = "MS_DEV_DISABLE_PREBUILD";
|
||||
|
||||
void AddAscendIRFusionRulesPass(PassManager *ir_fusion_pm) {
|
||||
MS_EXCEPTION_IF_NULL(ir_fusion_pm);
|
||||
ir_fusion_pm->AddPass(std::make_shared<LambUpdateWithLRRuleFusion>());
|
||||
|
@ -491,7 +493,7 @@ void AscendBackendUBFusionOptimization(const std::shared_ptr<session::KernelGrap
|
|||
MS_LOG(INFO) << "Dynamic shape skip fusion";
|
||||
return;
|
||||
}
|
||||
auto pre_build = common::GetEnv("MS_DISABLE_PREBUILD");
|
||||
auto pre_build = common::GetEnv(kDisablePrebuildEnv);
|
||||
if (pre_build.empty() || (pre_build != "true" && pre_build != "True")) {
|
||||
auto &build_manager = kernel::ascend::TbeKernelCompileManager::GetInstance();
|
||||
build_manager.TbePreBuild(kernel_graph);
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
namespace mindspore::opt {
|
||||
namespace {
|
||||
constexpr char kMsAscendFusionSwitch[] = "MS_ASCEND_FUSION_SWITCH";
|
||||
constexpr char kMsAscendFusionSwitch[] = "MS_DEV_ASCEND_FUSION_SWITCH";
|
||||
} // namespace
|
||||
|
||||
bool PassWithSwitch::Run(const FuncGraphPtr &func_graph) {
|
||||
|
|
|
@ -388,9 +388,9 @@ class AscendEnvChecker(EnvChecker):
|
|||
|
||||
def check_version_and_env_config():
|
||||
"""check version and env config"""
|
||||
if os.getenv("MS_CLOSE_VERSION_CHECK") == "ON":
|
||||
if os.getenv("MS_DEV_CLOSE_VERSION_CHECK") == "ON":
|
||||
return
|
||||
os.environ["MS_CLOSE_VERSION_CHECK"] = "ON"
|
||||
os.environ["MS_DEV_CLOSE_VERSION_CHECK"] = "ON"
|
||||
if __package_name__.lower() == "mindspore-ascend":
|
||||
env_checker = AscendEnvChecker()
|
||||
# Note: pre-load libgomp.so to solve error like "cannot allocate memory in statis TLS block"
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#undef private
|
||||
|
||||
namespace {
|
||||
constexpr char kMsAscendFusionSwitch[] = "MS_ASCEND_FUSION_SWITCH";
|
||||
constexpr char kMsAscendFusionSwitch[] = "MS_DEV_ASCEND_FUSION_SWITCH";
|
||||
} // namespace
|
||||
namespace mindspore {
|
||||
namespace opt {
|
||||
|
@ -95,7 +95,7 @@ class TestAscendPassControl : public UT::Common {
|
|||
};
|
||||
|
||||
/// Feature: Pass Switch
|
||||
/// Description: no MS_ASCEND_FUSION_SWITCH set and run pass
|
||||
/// Description: no MS_DEV_ASCEND_FUSION_SWITCH set and run pass
|
||||
/// Expectation: switch pass run, plant pass run
|
||||
TEST_F(TestAscendPassControl, test_no_env_for_pass) {
|
||||
(void)unsetenv(kMsAscendFusionSwitch);
|
||||
|
@ -111,7 +111,7 @@ TEST_F(TestAscendPassControl, test_no_env_for_pass) {
|
|||
}
|
||||
|
||||
/// Feature: Pass Switch
|
||||
/// Description: set MS_ASCEND_FUSION_SWITCH as "on" and run pass
|
||||
/// Description: set MS_DEV_ASCEND_FUSION_SWITCH as "on" and run pass
|
||||
/// Expectation: switch pass run, plant pass run
|
||||
TEST_F(TestAscendPassControl, test_env_on_for_pass_0) {
|
||||
(void)setenv(kMsAscendFusionSwitch, "on", 1);
|
||||
|
@ -127,7 +127,7 @@ TEST_F(TestAscendPassControl, test_env_on_for_pass_0) {
|
|||
}
|
||||
|
||||
/// Feature: Pass Switch
|
||||
/// Description: set invalid MS_ASCEND_FUSION_SWITCH and run pass
|
||||
/// Description: set invalid MS_DEV_ASCEND_FUSION_SWITCH and run pass
|
||||
/// Expectation: switch pass run, plant pass run
|
||||
TEST_F(TestAscendPassControl, test_env_on_for_pass_1) {
|
||||
(void)setenv(kMsAscendFusionSwitch, "invalidxxxxxxxx", 1);
|
||||
|
@ -143,7 +143,7 @@ TEST_F(TestAscendPassControl, test_env_on_for_pass_1) {
|
|||
}
|
||||
|
||||
/// Feature: Pass Switch
|
||||
/// Description: set MS_ASCEND_FUSION_SWITCH as "0" and run pass
|
||||
/// Description: set MS_DEV_ASCEND_FUSION_SWITCH as "0" and run pass
|
||||
/// Expectation: switch pass dont run, plant pass run
|
||||
TEST_F(TestAscendPassControl, test_env_off_for_pass_0) {
|
||||
(void)setenv(kMsAscendFusionSwitch, "0", 1);
|
||||
|
@ -159,7 +159,7 @@ TEST_F(TestAscendPassControl, test_env_off_for_pass_0) {
|
|||
}
|
||||
|
||||
/// Feature: Pass Switch
|
||||
/// Description: set MS_ASCEND_FUSION_SWITCH as "off" and run pass
|
||||
/// Description: set MS_DEV_ASCEND_FUSION_SWITCH as "off" and run pass
|
||||
/// Expectation: switch pass dont run, plant pass run
|
||||
TEST_F(TestAscendPassControl, test_env_off_for_pass_1) {
|
||||
(void)setenv(kMsAscendFusionSwitch, "off", 1);
|
||||
|
@ -175,7 +175,7 @@ TEST_F(TestAscendPassControl, test_env_off_for_pass_1) {
|
|||
}
|
||||
|
||||
/// Feature: Pass Switch
|
||||
/// Description: set MS_ASCEND_FUSION_SWITCH as "OFF" and run pass
|
||||
/// Description: set MS_DEV_ASCEND_FUSION_SWITCH as "OFF" and run pass
|
||||
/// Expectation: switch pass dont run, plant pass run
|
||||
TEST_F(TestAscendPassControl, test_env_off_for_pass_2) {
|
||||
(void)setenv(kMsAscendFusionSwitch, "OFF", 1);
|
||||
|
@ -191,7 +191,7 @@ TEST_F(TestAscendPassControl, test_env_off_for_pass_2) {
|
|||
}
|
||||
|
||||
/// Feature: Pass Switch
|
||||
/// Description: no MS_ASCEND_FUSION_SWITCH set and run pattern pass
|
||||
/// Description: no MS_DEV_ASCEND_FUSION_SWITCH set and run pattern pass
|
||||
/// Expectation: switch pass run, plant pass run
|
||||
TEST_F(TestAscendPassControl, test_no_env_for_pattern_pass) {
|
||||
(void)unsetenv(kMsAscendFusionSwitch);
|
||||
|
@ -209,7 +209,7 @@ TEST_F(TestAscendPassControl, test_no_env_for_pattern_pass) {
|
|||
}
|
||||
|
||||
/// Feature: Pass Switch
|
||||
/// Description: MS_ASCEND_FUSION_SWITCH set on and run pattern pass
|
||||
/// Description: MS_DEV_ASCEND_FUSION_SWITCH set on and run pattern pass
|
||||
/// Expectation: switch pass run, plant pass run
|
||||
TEST_F(TestAscendPassControl, test_env_on_for_pattern_pass) {
|
||||
(void)setenv(kMsAscendFusionSwitch, "on", 1);
|
||||
|
@ -227,7 +227,7 @@ TEST_F(TestAscendPassControl, test_env_on_for_pattern_pass) {
|
|||
}
|
||||
|
||||
/// Feature: Pass Switch
|
||||
/// Description: MS_ASCEND_FUSION_SWITCH set invalid and run pattern pass
|
||||
/// Description: MS_DEV_ASCEND_FUSION_SWITCH set invalid and run pattern pass
|
||||
/// Expectation: switch pass run, plant pass run
|
||||
TEST_F(TestAscendPassControl, test_env_invalid_for_pattern_pass) {
|
||||
(void)setenv(kMsAscendFusionSwitch, "invalid_xxasdasdasfsldjmg", 1);
|
||||
|
@ -245,7 +245,7 @@ TEST_F(TestAscendPassControl, test_env_invalid_for_pattern_pass) {
|
|||
}
|
||||
|
||||
/// Feature: Pass Switch
|
||||
/// Description: MS_ASCEND_FUSION_SWITCH set off and run pattern pass
|
||||
/// Description: MS_DEV_ASCEND_FUSION_SWITCH set off and run pattern pass
|
||||
/// Expectation: switch pass dont run, plant pass run
|
||||
TEST_F(TestAscendPassControl, test_env_off_for_pattern_pass_0) {
|
||||
(void)setenv(kMsAscendFusionSwitch, "off", 1);
|
||||
|
@ -263,7 +263,7 @@ TEST_F(TestAscendPassControl, test_env_off_for_pattern_pass_0) {
|
|||
}
|
||||
|
||||
/// Feature: Pass Switch
|
||||
/// Description: MS_ASCEND_FUSION_SWITCH set OFF and run pattern pass
|
||||
/// Description: MS_DEV_ASCEND_FUSION_SWITCH set OFF and run pattern pass
|
||||
/// Expectation: switch pass dont run, plant pass run
|
||||
TEST_F(TestAscendPassControl, test_env_off_for_pattern_pass_1) {
|
||||
(void)setenv(kMsAscendFusionSwitch, "OFF", 1);
|
||||
|
@ -281,7 +281,7 @@ TEST_F(TestAscendPassControl, test_env_off_for_pattern_pass_1) {
|
|||
}
|
||||
|
||||
/// Feature: Pass Switch
|
||||
/// Description: MS_ASCEND_FUSION_SWITCH set 0 and run pattern pass
|
||||
/// Description: MS_DEV_ASCEND_FUSION_SWITCH set 0 and run pattern pass
|
||||
/// Expectation: switch pass dont run, plant pass run
|
||||
TEST_F(TestAscendPassControl, test_env_off_for_pattern_pass_2) {
|
||||
(void)setenv(kMsAscendFusionSwitch, "0", 1);
|
||||
|
|
Loading…
Reference in New Issue