[Bugfix] Remove cuda related lines and add additional pip mirror (#1252)
### What this PR does / why we need it? - For npu environment, we should use `PYTORCH_NPU_ALLOC_CONF ` rather than `PYTORCH_CUDA_ALLOC_CONF` - Add `PIP_EXTRA_INDEX_URL` to make nightly_benchmarks happy --------- Signed-off-by: wangli <wangli858794774@gmail.com>
This commit is contained in:
2
.github/workflows/nightly_benchmarks.yaml
vendored
2
.github/workflows/nightly_benchmarks.yaml
vendored
@@ -167,6 +167,8 @@ jobs:
|
||||
cp -r benchmarks/* /github/home/benchmarks/
|
||||
|
||||
- name: Run benchmark iteration
|
||||
env:
|
||||
PIP_EXTRA_INDEX_URL: https://mirrors.huaweicloud.com/ascend/repos/pypi
|
||||
if: github.event_name != 'pull_request'
|
||||
run: |
|
||||
while IFS= read -r line || [[ -n "$line" ]]; do
|
||||
|
||||
@@ -144,7 +144,7 @@ class CaMemAllocator:
|
||||
return CaMemAllocator.instance
|
||||
|
||||
def __init__(self):
|
||||
conf = os.environ.get("PYTORCH_CUDA_ALLOC_CONF", "")
|
||||
conf = os.environ.get("PYTORCH_NPU_ALLOC_CONF", "")
|
||||
assert "expandable_segments:True" not in conf, \
|
||||
("Expandable segments are not compatible with memory pool. "
|
||||
"Please track https://github.com/pytorch/pytorch/issues/147851 "
|
||||
|
||||
Reference in New Issue
Block a user