MCPcopy Create free account
hub / github.com/alibaba/BladeDISC / cwd

Function cwd

scripts/python/common_setup.py:185–195  ·  view source on GitHub ↗

Change the current working directory to `path` to do somthing and then recover the current cwd when it's done.

(path)

Source from the content-addressed store, hash-verified

183
184@contextmanager
185def cwd(path):
186 """
187 Change the current working directory to `path` to do somthing and then
188 recover the current cwd when it's done.
189 """
190 old_dir = os.getcwd()
191 os.chdir(path)
192 try:
193 yield
194 finally:
195 os.chdir(old_dir)
196
197
198def running_on_ci():

Callers 11

configure_compilerFunction · 0.90
configure_bridgeFunction · 0.90
build_tao_compilerFunction · 0.90
test_tao_compilerFunction · 0.90
build_tao_bridgeFunction · 0.90
test_tao_bridgeFunction · 0.90
make_packageFunction · 0.90
config_mkldnnFunction · 0.70
build_mkldnnFunction · 0.70
cleanup_building_envFunction · 0.70

Calls

no outgoing calls

Tested by 2

test_tao_compilerFunction · 0.72
test_tao_bridgeFunction · 0.72