forked from mindspore-Ecosystem/mindspore
!24558 Fix windows import mindspore._c_dataengine failed problem to r1.3 patch
Merge pull request !24558 from xiefangqi/md_fix_windows_dll_r1.3_patch
This commit is contained in:
commit
bfb901e5cc
|
@ -15,7 +15,7 @@ if(WIN32)
|
|||
VER 0.1.92
|
||||
LIBS sentencepiece sentencepiece_train
|
||||
URL ${REQ_URL}
|
||||
CMAKE_OPTION -DCMAKE_BUILD_TYPE=Release -DSPM_USE_BUILTIN_PROTOBUF=ON
|
||||
CMAKE_OPTION -DCMAKE_BUILD_TYPE=Release -DSPM_USE_BUILTIN_PROTOBUF=ON -DSPM_ENABLE_SHARED=OFF
|
||||
MD5 ${MD5}
|
||||
)
|
||||
else()
|
||||
|
|
|
@ -30,13 +30,10 @@ std::optional<std::string> Common::GetRealPath(const std::string &input_path) {
|
|||
if (input_path.length() >= PATH_MAX) {
|
||||
MS_LOG(EXCEPTION) << "The length of path: " << input_path << " exceeds limit: " << PATH_MAX;
|
||||
}
|
||||
#if defined(SYSTEM_ENV_POSIX)
|
||||
size_t path_split_pos = input_path.find_last_of('/');
|
||||
#elif defined(SYSTEM_ENV_WINDOWS)
|
||||
size_t path_split_pos = input_path.find_last_of('\\');
|
||||
#else
|
||||
MS_LOG(EXCEPTION) << "Unsupported platform.";
|
||||
#endif
|
||||
auto path_split_pos = input_path.find_last_of('/');
|
||||
if (path_split_pos == std::string::npos) {
|
||||
path_split_pos = input_path.find_last_of('\\');
|
||||
}
|
||||
// get real path
|
||||
char real_path[PATH_MAX] = {0};
|
||||
// input_path is dir + file_name
|
||||
|
|
|
@ -17,6 +17,7 @@ The configuration module provides various functions to set and get the supported
|
|||
configuration parameters, and read a configuration file.
|
||||
"""
|
||||
import os
|
||||
import platform
|
||||
import random
|
||||
import time
|
||||
import numpy
|
||||
|
@ -428,6 +429,10 @@ def get_enable_shared_mem():
|
|||
>>> # Get the flag of shared memory feature.
|
||||
>>> shared_mem_flag = ds.config.get_enable_shared_mem()
|
||||
"""
|
||||
# For windows we forbid shared mem function temporarily
|
||||
if platform.system().lower() == 'windows':
|
||||
logger.warning("For windows we forbid shared mem function temporarily.")
|
||||
return False
|
||||
return _config.get_enable_shared_mem()
|
||||
|
||||
|
||||
|
|
|
@ -2150,7 +2150,8 @@ class BatchDataset(Dataset):
|
|||
res_q_list = []
|
||||
|
||||
# Register clean zombie subprocesses signal here
|
||||
signal.signal(signal.SIGCHLD, wait_child_processes)
|
||||
if platform.system().lower() != "windows":
|
||||
signal.signal(signal.SIGCHLD, wait_child_processes)
|
||||
|
||||
# If user didn't specify num_parallel_workers, set it to default
|
||||
if self.num_parallel_workers is not None:
|
||||
|
@ -2648,7 +2649,8 @@ class MapDataset(Dataset):
|
|||
|
||||
if callable_list:
|
||||
# Register clean zombie subprocesses signal here
|
||||
signal.signal(signal.SIGCHLD, wait_child_processes)
|
||||
if platform.system().lower() != "windows":
|
||||
signal.signal(signal.SIGCHLD, wait_child_processes)
|
||||
|
||||
# Construct pool with the callable list
|
||||
# The callable list and _pyfunc_worker_init are used to pass lambda function in to subprocesses
|
||||
|
@ -3594,7 +3596,8 @@ class SamplerFn:
|
|||
# Event for end of epoch
|
||||
if multi_process is True:
|
||||
# Register clean zombie subprocesses signal here
|
||||
signal.signal(signal.SIGCHLD, wait_child_processes)
|
||||
if platform.system().lower() != "windows":
|
||||
signal.signal(signal.SIGCHLD, wait_child_processes)
|
||||
|
||||
try:
|
||||
self.eof = multiprocessing.Event()
|
||||
|
|
|
@ -113,7 +113,7 @@ def test_e2e_dump():
|
|||
run_e2e_dump()
|
||||
|
||||
|
||||
@pytest.mark.level0
|
||||
@pytest.mark.level1
|
||||
@pytest.mark.platform_arm_ascend_training
|
||||
@pytest.mark.platform_x86_ascend_training
|
||||
@pytest.mark.env_onecard
|
||||
|
|
Loading…
Reference in New Issue