Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 097238f

Browse files
mcarillidefinitelynotmcarilli
andauthored
Add Pyprof removal warnings that point to new repo (NVIDIA#862)
Co-authored-by: Michael Carilli <[email protected]>
1 parent 76026a3 commit 097238f

3 files changed

Lines changed: 15 additions & 5 deletions

File tree

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,8 @@ A Python-only build omits:
138138
- Fused kernels that improve the performance of `apex.parallel.DistributedDataParallel` and `apex.amp`.
139139
`DistributedDataParallel`, `amp`, and `SyncBatchNorm` will still be usable, but they may be slower.
140140

141-
To enable PyProf support, you need to install the packages required by PyProf. To do so, add the "--pyprof" option at installation time:
142-
```
143-
$ pip install -v --no-cache-dir --global-option="--pyprof" --global-option="--cpp_ext" --global-option="--cuda_ext" ./
144-
```
141+
Pyprof support has been moved to its own [dedicated repository](https://github.com/NVIDIA/PyProf).
142+
The codebase is deprecated in Apex and will be removed soon.
145143

146144
### Windows support
147145
Windows support is experimental, and Linux is recommended. `pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" .` may work if you were able to build Pytorch from source

apex/pyprof/nvtx/nvmarker.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,13 @@ def patchClass(cls):
204204
add_wrapper(cls, f)
205205

206206
def init():
207+
string = "\n\nPyprof has been moved to its own dedicated repository and will " + \
208+
"soon be removed from Apex. Please visit\n" + \
209+
"https://github.com/NVIDIA/PyProf\n" + \
210+
"for the latest version.\n\n"
211+
# print regardless of warning state
212+
print(string)
213+
207214
print("Initializing NVTX monkey patches")
208215
for cls in [torch, torch.Tensor, torch.nn.functional,]:
209216
patchClass(cls)

setup.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
if os.environ.get("TORCH_CUDA_ARCH_LIST", None) is None:
2323
os.environ["TORCH_CUDA_ARCH_LIST"] = "6.0;6.1;6.2;7.0;7.5"
2424

25-
print("torch.__version__ = ", torch.__version__)
25+
print("\n\ntorch.__version__ = {}\n\n".format(torch.__version__))
2626
TORCH_MAJOR = int(torch.__version__.split('.')[0])
2727
TORCH_MINOR = int(torch.__version__.split('.')[1])
2828

@@ -35,6 +35,11 @@
3535

3636
extras = {}
3737
if "--pyprof" in sys.argv:
38+
string = "\n\nPyprof has been moved to its own dedicated repository and will " + \
39+
"soon be removed from Apex. Please visit\n" + \
40+
"https://github.com/NVIDIA/PyProf\n" + \
41+
"for the latest version."
42+
warnings.warn(string, DeprecationWarning)
3843
with open('requirements.txt') as f:
3944
required_packages = f.read().splitlines()
4045
extras['pyprof'] = required_packages

0 commit comments

Comments
 (0)