Skip to content

Conversation

@ezyang
Copy link
Contributor

@ezyang ezyang commented Mar 28, 2019

Stack from ghstack:

Fixes #111.

Example output:

PyTorch built with:
  - GCC 4.8
  - Intel(R) Math Kernel Library Version 2019.0.3 Product Build 20190125 for Intel(R) 64 architecture applications
  - Intel(R) MKL-DNN v0.18.1 (Git Hash 7de7e5d02bf687f971e7668963649728356e0c20)
  - OpenMP 201107 (a.k.a. OpenMP 3.1)
  - NNPACK is enabled
  - CUDA Runtime 9.2
  - NVCC architecture flags: -gencode;arch=compute_52,code=sm_52
  - CudNN 7.10.2  (built against CUDA 9.1)
  - Magma 2.5.0
  - Build settings: BLAS=MKL, BUILD_TYPE=Release, CXX_FLAGS=  -Wno-deprecated -fvisibility-inlines-hidden -fopenmp -O2 -fPIC -Wno-narrowing -Wall -Wextra -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -Wno-unused-but-set-variable -Wno-maybe-uninitialized, DISABLE_NUMA=1, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, USE_CUDA=True, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=True, USE_NNPACK=True, USE_OPENMP=ON,

Signed-off-by: Edward Z. Yang [email protected]

gh-metadata: pytorch pytorch 18579 gh/ezyang/48/head

Differential Revision: D14778507

…all libraries.

Example output:

```
PyTorch built with:
  - GCC 4.8
  - Intel(R) Math Kernel Library Version 2019.0.3 Product Build 20190125 for Intel(R) 64 architecture applications
  - Intel(R) MKL-DNN v0.18.1 (Git Hash 7de7e5d02bf687f971e7668963649728356e0c20)
  - OpenMP 201107 (a.k.a. OpenMP 3.1)
  - CUDA Runtime 9.2.0
  - CuDNN 7.1.2
```

Signed-off-by: Edward Z. Yang <[email protected]>
@ezyang ezyang requested a review from soumith March 28, 2019 19:28
@soumith
Copy link
Contributor

soumith commented Mar 28, 2019

this fixes #111

You might want to rename the methods slightly to match numpy, if you think it makes sense

@ezyang
Copy link
Contributor Author

ezyang commented Mar 28, 2019

Makes sense to me!

Copy link
Collaborator

@dzhulgakov dzhulgakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to unify it with Caffe2's build options here: caffe2/core/macros.h.in caffe2/core/common.cc

Specifically, if you follow new format, I'd add the following compilation flags:

  • BUILD_TYPE
  • CXX_FLAGS
  • BLAS (as we will likely replace the ugly THBlas soon)
  • USE_NNPACK
  • USE_FBGEMM (as we're adding quantization support now) - and include its version

#endif
}

static PyObject *THPModule_detailedVersion(PyObject *module)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: shall we start using pybind universally?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For things like this one sure, but I don't trust pybind enough to feel ok with using it for our performance-critical eager functions.

@ezyang
Copy link
Contributor Author

ezyang commented Apr 4, 2019

Would be nice to unify it with Caffe2's build options here: caffe2/core/macros.h.in caffe2/core/common.cc

Thanks, was not aware of this.

@ezyang
Copy link
Contributor Author

ezyang commented Apr 4, 2019

USE_FBGEMM (as we're adding quantization support now) - and include its version

fbgemm does not appear to have any useful versions. Determined by looking at Fbgemm.h and searching for configure_file in the cmake

@ezyang ezyang changed the title Add torch.backends.detailed_version(), reporting detailed version of all libraries. Add torch.__config__.show(), reporting detailed version of all libraries. Apr 4, 2019
ezyang added 4 commits April 4, 2019 12:06
… all libraries."

Add torch.__config__.show(), reporting detailed version of all libraries.

Fixes #111.

Example output:

```
PyTorch built with:
  - GCC 4.8
  - Intel(R) Math Kernel Library Version 2019.0.3 Product Build 20190125 for Intel(R) 64 architecture applications
  - Intel(R) MKL-DNN v0.18.1 (Git Hash 7de7e5d02bf687f971e7668963649728356e0c20)
  - OpenMP 201107 (a.k.a. OpenMP 3.1)
  - CUDA Runtime 9.2.0
  - CuDNN 7.1.2
```

Signed-off-by: Edward Z. Yang <[email protected]>

gh-metadata: pytorch pytorch 18579 gh/ezyang/48/head
…ailed version of all libraries."

Add torch.__config__.show(), reporting detailed version of all libraries.

Fixes #111.

Example output:

```
PyTorch built with:
  - GCC 4.8
  - Intel(R) Math Kernel Library Version 2019.0.3 Product Build 20190125 for Intel(R) 64 architecture applications
  - Intel(R) MKL-DNN v0.18.1 (Git Hash 7de7e5d02bf687f971e7668963649728356e0c20)
  - OpenMP 201107 (a.k.a. OpenMP 3.1)
  - CUDA Runtime 9.2.0
  - CuDNN 7.1.2
```

Signed-off-by: Edward Z. Yang <[email protected]>

gh-metadata: pytorch pytorch 18579 gh/ezyang/48/head
…iled version of all libraries."

Add torch.__config__.show(), reporting detailed version of all libraries.

Fixes #111.

Example output:

```
PyTorch built with:
  - GCC 4.8
  - Intel(R) Math Kernel Library Version 2019.0.3 Product Build 20190125 for Intel(R) 64 architecture applications
  - Intel(R) MKL-DNN v0.18.1 (Git Hash 7de7e5d02bf687f971e7668963649728356e0c20)
  - OpenMP 201107 (a.k.a. OpenMP 3.1)
  - CUDA Runtime 9.2.0
  - CuDNN 7.1.2
```

Signed-off-by: Edward Z. Yang <[email protected]>

gh-metadata: pytorch pytorch 18579 gh/ezyang/48/head
…sion of all libraries."

Add torch.__config__.show(), reporting detailed version of all libraries.

Fixes #111.

Example output:

```
PyTorch built with:
  - GCC 4.8
  - Intel(R) Math Kernel Library Version 2019.0.3 Product Build 20190125 for Intel(R) 64 architecture applications
  - Intel(R) MKL-DNN v0.18.1 (Git Hash 7de7e5d02bf687f971e7668963649728356e0c20)
  - OpenMP 201107 (a.k.a. OpenMP 3.1)
  - CUDA Runtime 9.2.0
  - CuDNN 7.1.2
```

Signed-off-by: Edward Z. Yang <[email protected]>

gh-metadata: pytorch pytorch 18579 gh/ezyang/48/head
@ppwwyyxx
Copy link
Collaborator

ppwwyyxx commented Apr 5, 2019

For cuda/cudnn, etc, could build-time version be different from run-time version in its minor version number or patch number?
If yes, it would be great to have access to both build-time version and run-time version available for debugging (perhaps with cudnnGetVersion & cudaRuntimeGetVersion)

@ezyang
Copy link
Contributor Author

ezyang commented Apr 5, 2019

@ppwwyyxx Makes sense to me!

… all libraries."

Add torch.__config__.show(), reporting detailed version of all libraries.

Fixes #111.

Example output:

```
PyTorch built with:
  - GCC 4.8
  - Intel(R) Math Kernel Library Version 2019.0.3 Product Build 20190125 for Intel(R) 64 architecture applications
  - Intel(R) MKL-DNN v0.18.1 (Git Hash 7de7e5d02bf687f971e7668963649728356e0c20)
  - OpenMP 201107 (a.k.a. OpenMP 3.1)
  - CUDA Runtime 9.2.0
  - CuDNN 7.1.2
```

Signed-off-by: Edward Z. Yang <[email protected]>

gh-metadata: pytorch pytorch 18579 gh/ezyang/48/head
@ezyang
Copy link
Contributor Author

ezyang commented Apr 5, 2019

Now also with nvcc arch information

ezyang added 3 commits April 5, 2019 14:53
… all libraries."

Add torch.__config__.show(), reporting detailed version of all libraries.

Fixes #111.

Example output:

```
PyTorch built with:
  - GCC 4.8
  - Intel(R) Math Kernel Library Version 2019.0.3 Product Build 20190125 for Intel(R) 64 architecture applications
  - Intel(R) MKL-DNN v0.18.1 (Git Hash 7de7e5d02bf687f971e7668963649728356e0c20)
  - OpenMP 201107 (a.k.a. OpenMP 3.1)
  - CUDA Runtime 9.2.0
  - CuDNN 7.1.2
```

Signed-off-by: Edward Z. Yang <[email protected]>

gh-metadata: pytorch pytorch 18579 gh/ezyang/48/head
…detailed version of all libraries."

Add torch.__config__.show(), reporting detailed version of all libraries.

Fixes #111.

Example output:

```
PyTorch built with:
  - GCC 4.8
  - Intel(R) Math Kernel Library Version 2019.0.3 Product Build 20190125 for Intel(R) 64 architecture applications
  - Intel(R) MKL-DNN v0.18.1 (Git Hash 7de7e5d02bf687f971e7668963649728356e0c20)
  - OpenMP 201107 (a.k.a. OpenMP 3.1)
  - CUDA Runtime 9.2.0
  - CuDNN 7.1.2
```

Signed-off-by: Edward Z. Yang <[email protected]>

gh-metadata: pytorch pytorch 18579 gh/ezyang/48/head
…etailed version of all libraries."

Add torch.__config__.show(), reporting detailed version of all libraries.

Fixes #111.

Example output:

```
PyTorch built with:
  - GCC 4.8
  - Intel(R) Math Kernel Library Version 2019.0.3 Product Build 20190125 for Intel(R) 64 architecture applications
  - Intel(R) MKL-DNN v0.18.1 (Git Hash 7de7e5d02bf687f971e7668963649728356e0c20)
  - OpenMP 201107 (a.k.a. OpenMP 3.1)
  - CUDA Runtime 9.2.0
  - CuDNN 7.1.2
```

Signed-off-by: Edward Z. Yang <[email protected]>

gh-metadata: pytorch pytorch 18579 gh/ezyang/48/head
Copy link
Collaborator

@dzhulgakov dzhulgakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, do you want to also include the following:
BUILD_TYPE
CXX_FLAGS
BLAS (as we will likely replace the ugly THBlas soon)
USE_NNPACK
USE_FBGEMM (as we're adding quantization support now) - and include its version

Even if FBGEMM doesn't have exported version, just the fact whether we build with it or not, same for NNPACK.

Even for MKL and others - I'd suggest to explicitly adding a line "MKL: none" to the output

@ezyang
Copy link
Contributor Author

ezyang commented Apr 8, 2019

@dzhulgakov I'm assuming part of your comment is an accidental copy paste from the earlier comment.

Right now, I print all of the existing Caffe2 settings as part of the Build settings key, filtering out keys which are set to an empty string. Do you want each of these to be given their own line in the output? Also, are you asking to stop filtering out empty string keys? (I feel they add unnecessary noise to the output)

… detailed version of all libraries."

Add torch.__config__.show(), reporting detailed version of all libraries.

Fixes #111.

Example output:

```
PyTorch built with:
  - GCC 4.8
  - Intel(R) Math Kernel Library Version 2019.0.3 Product Build 20190125 for Intel(R) 64 architecture applications
  - Intel(R) MKL-DNN v0.18.1 (Git Hash 7de7e5d02bf687f971e7668963649728356e0c20)
  - OpenMP 201107 (a.k.a. OpenMP 3.1)
  - CUDA Runtime 9.2.0
  - CuDNN 7.1.2
```

Signed-off-by: Edward Z. Yang <[email protected]>

gh-metadata: pytorch pytorch 18579 gh/ezyang/48/head
Copy link
Collaborator

@dzhulgakov dzhulgakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies, I was looking at the old code version (GH UI is confusing)

…ch.__config__.show(), reporting detailed version of all libraries."

Add torch.__config__.show(), reporting detailed version of all libraries.

Fixes #111.

Example output:

```
PyTorch built with:
  - GCC 4.8
  - Intel(R) Math Kernel Library Version 2019.0.3 Product Build 20190125 for Intel(R) 64 architecture applications
  - Intel(R) MKL-DNN v0.18.1 (Git Hash 7de7e5d02bf687f971e7668963649728356e0c20)
  - OpenMP 201107 (a.k.a. OpenMP 3.1)
  - CUDA Runtime 9.2.0
  - CuDNN 7.1.2
```

Signed-off-by: Edward Z. Yang <[email protected]>

gh-metadata: pytorch pytorch 18579 gh/ezyang/48/head
@vadimkantorov
Copy link
Contributor

vadimkantorov commented Apr 9, 2019

would this be useful for collect_env script to report build time config (if torch can be loaded and not completely broken)?

zdevito pushed a commit to zdevito/ATen that referenced this pull request Apr 9, 2019
…ies. (#18579)

Summary:
Pull Request resolved: pytorch/pytorch#18579
ghimport-source-id: 65124c95e49423de4ad1008c65e75057fea09b94

Differential Revision: D14778507

Pulled By: ezyang

fbshipit-source-id: 1e4bb79f4800a116ce8fb7af2fefbd34da8d102c
@facebook-github-bot
Copy link
Contributor

@ezyang merged this pull request in 29ea086.

@ppwwyyxx
Copy link
Collaborator

@ezyang

  • CudNN 7.10.2 (built against CUDA 9.1)

There is no cudnn 7.10.2.

Cudnn version numbers work a bit different from cuda. 7102 means 7.1.2.

@ezyang
Copy link
Contributor Author

ezyang commented Apr 10, 2019

@ppwwyyxx Oops! Thanks for the catch.

zhangguanheng66 pushed a commit to zhangguanheng66/pytorch that referenced this pull request May 6, 2019
…ies. (pytorch#18579)

Summary:
Pull Request resolved: pytorch#18579
ghimport-source-id: 65124c9

Differential Revision: D14778507

Pulled By: ezyang

fbshipit-source-id: 1e4bb79f4800a116ce8fb7af2fefbd34da8d102c
@ezyang ezyang deleted the gh/ezyang/48/head branch May 30, 2019 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants