Skip to content

Commit

Permalink
add support torch v0.12.x, update wheels config, use shapenetv2 in ci (
Browse files Browse the repository at this point in the history
…#605)

Signed-off-by: Clement Fuji Tsang <cfujitsang@nvidia.com>
  • Loading branch information
Caenorst committed Aug 8, 2022
1 parent e855ea1 commit a00029e
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 40 deletions.
68 changes: 32 additions & 36 deletions ci/gitlab_jenkins_templates/core_ci.jenkins
Expand Up @@ -5,14 +5,6 @@ import groovy.transform.Field
// Configs for build from pytorch docker images
// (See: https://hub.docker.com/r/pytorch/pytorch/tags)
def ubuntu_from_pytorch_configs = [
[
'cudaVer': '10.2', 'cudnnVer': '7', 'torchVer': '1.8.1',
'archsToTest': 'Tesla_V100_PCIE_32GB;TITAN_RTX'
],
[
'cudaVer': '11.1', 'cudnnVer': '8', 'torchVer': '1.8.1',
'archsToTest': 'A100_PCIE_40GB'
],
[
'cudaVer': '10.2', 'cudnnVer': '7', 'torchVer': '1.9.0',
'archsToTest': 'Tesla_V100_PCIE_32GB'
Expand All @@ -28,7 +20,11 @@ def ubuntu_from_pytorch_configs = [
[
'cudaVer': '11.3', 'cudnnVer': '8', 'torchVer': '1.11.0',
'archsToTest': 'A100_PCIE_40GB'
]
],
[
'cudaVer': '11.3', 'cudnnVer': '8', 'torchVer': '1.12.0',
'archsToTest': 'A100_PCIE_40GB'
],
]

// Configs for build from NGC pytorch docker images
Expand All @@ -46,12 +42,12 @@ def ubuntu_from_nvcr_configs = [
def ubuntu_from_cuda_configs = [
[
'cudaVer': '10.2', 'cudnnVer': '7',
'pythonVer': '3.7', 'torchVer': '1.8.1',
'pythonVer': '3.7', 'torchVer': '1.9.1',
'archsToTest': 'Tesla_V100_PCIE_32GB;TITAN_RTX'
],
[
'cudaVer': '11.3.0', 'cudnnVer': '8',
'pythonVer': '3.9', 'torchVer': '1.11.0',
'cudaVer': '11.6.1', 'cudnnVer': '8',
'pythonVer': '3.9', 'torchVer': '1.12.1',
'archsToTest': 'A100_PCIE_40GB'
],
]
Expand All @@ -69,30 +65,6 @@ def ubuntu_cpuonly_configs = [

// Configs for building python wheels
def ubuntu_for_wheels_configs = [
[
'cudaVer': '10.1', 'cudnnVer': '7',
'torchVer': '1.8.0', 'archsToTest': 'TITAN_V'
],
[
'cudaVer': '10.2', 'cudnnVer': '7',
'torchVer': '1.8.0', 'archsToTest': 'TITAN_V'
],
[
'cudaVer': '11.1.1', 'cudnnVer': '8',
'torchVer': '1.8.0', 'archsToTest': 'TITAN_RTX'
],
[
'cudaVer': '10.1', 'cudnnVer': '7',
'torchVer': '1.8.1', 'archsToTest': 'TITAN_V'
],
[
'cudaVer': '10.2', 'cudnnVer': '7',
'torchVer': '1.8.1', 'archsToTest': 'TITAN_V'
],
[
'cudaVer': '11.1.1', 'cudnnVer': '8',
'torchVer': '1.8.1', 'archsToTest': 'TITAN_RTX'
],
[
'cudaVer': '10.2', 'cudnnVer': '7',
'torchVer': '1.9.0', 'archsToTest': 'TITAN_V'
Expand Down Expand Up @@ -152,6 +124,30 @@ def ubuntu_for_wheels_configs = [
[
'cudaVer': '11.3.1', 'cudnnVer': '8',
'torchVer': '1.11.0', 'archsToTest': 'A100_PCIE_40GB'
],
[
'cudaVer': '10.2', 'cudnnVer': '7',
'torchVer': '1.12.0', 'archsToTest': 'A100_PCIE_40GB'
],
[
'cudaVer': '11.3.1', 'cudnnVer': '8',
'torchVer': '1.12.0', 'archsToTest': 'A100_PCIE_40GB'
],
[
'cudaVer': '11.6.1', 'cudnnVer': '8',
'torchVer': '1.12.0', 'archsToTest': 'A100_PCIE_40GB'
],
[
'cudaVer': '10.2', 'cudnnVer': '7',
'torchVer': '1.12.1', 'archsToTest': 'A100_PCIE_40GB'
],
[
'cudaVer': '11.3.1', 'cudnnVer': '8',
'torchVer': '1.12.1', 'archsToTest': 'A100_PCIE_40GB'
],
[
'cudaVer': '11.6.1', 'cudnnVer': '8',
'torchVer': '1.12.1', 'archsToTest': 'A100_PCIE_40GB'
]
]

Expand Down
7 changes: 7 additions & 0 deletions ci/gitlab_jenkins_templates/ubuntu_test_CI.jenkins
Expand Up @@ -10,6 +10,10 @@ yaml:"""
apiVersion: v1
kind: Pod
spec:
volumes:
- name: pvc-mount
persistentVolumeClaim:
claimName: 'kaolin-pvc'
containers:
- name: docker
image: ${imageTag}
Expand All @@ -21,6 +25,9 @@ spec:
limits:
nvidia.com/gpu: 1
tty: true
volumeMounts:
- mountPath: /mnt
name: pvc-mount
nodeSelector:
kubernetes.io/os: linux
nvidia.com/gpu_type: ${arch}
Expand Down
33 changes: 30 additions & 3 deletions examples/tutorial/camera_and_rasterization.ipynb
Expand Up @@ -5,8 +5,28 @@
"execution_count": 1,
"id": "69114969",
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Requirement already satisfied: matplotlib in /opt/conda/lib/python3.8/site-packages (3.5.2)\n",
"Requirement already satisfied: kiwisolver>=1.0.1 in /opt/conda/lib/python3.8/site-packages (from matplotlib) (1.4.4)\n",
"Requirement already satisfied: cycler>=0.10 in /opt/conda/lib/python3.8/site-packages (from matplotlib) (0.11.0)\n",
"Requirement already satisfied: packaging>=20.0 in /opt/conda/lib/python3.8/site-packages (from matplotlib) (21.3)\n",
"Requirement already satisfied: fonttools>=4.22.0 in /opt/conda/lib/python3.8/site-packages (from matplotlib) (4.34.4)\n",
"Requirement already satisfied: numpy>=1.17 in /opt/conda/lib/python3.8/site-packages (from matplotlib) (1.21.2)\n",
"Requirement already satisfied: pillow>=6.2.0 in /opt/conda/lib/python3.8/site-packages (from matplotlib) (9.0.1)\n",
"Requirement already satisfied: pyparsing>=2.2.1 in /opt/conda/lib/python3.8/site-packages (from matplotlib) (3.0.9)\n",
"Requirement already satisfied: python-dateutil>=2.7 in /opt/conda/lib/python3.8/site-packages (from matplotlib) (2.8.2)\n",
"Requirement already satisfied: six>=1.5 in /opt/conda/lib/python3.8/site-packages (from python-dateutil>=2.7->matplotlib) (1.16.0)\n",
"\u001b[33mWARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv\u001b[0m\u001b[33m\n",
"\u001b[0m"
]
}
],
"source": [
"!pip install matplotlib\n",
"import glob\n",
"import math\n",
"\n",
Expand All @@ -33,7 +53,8 @@
"metadata": {},
"outputs": [],
"source": [
"ds = kal.io.shapenet.ShapeNetV2(root='/data/ShapeNetCore.v2/', categories=['car'],\n",
"# Here replace the \"root\" by the path where you are storing shapenet\n",
"ds = kal.io.shapenet.ShapeNetV2(root='/mnt/data/ci_shapenetv2/', categories=['car'],\n",
" train=True, split=1., with_materials=True)\n",
"\n",
"# Normalize the data between [-0.5, 0.5]\n",
Expand Down Expand Up @@ -1166,7 +1187,13 @@
}
],
"source": [
"%matplotlib notebook\n",
"try:\n",
" ipy_str = str(type(get_ipython()))\n",
" if 'zmqshell' in ipy_str:\n",
" %matplotlib notebook\n",
"finally:\n",
" pass\n",
"\n",
"from matplotlib.widgets import Button\n",
"\n",
"fig, ax = plt.subplots()\n",
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -14,7 +14,7 @@
import warnings

TORCH_MIN_VER = '1.5.0'
TORCH_MAX_VER = '1.11.0'
TORCH_MAX_VER = '1.12.1'
CYTHON_MIN_VER = '0.29.20'
INCLUDE_EXPERIMENTAL = os.getenv('KAOLIN_INSTALL_EXPERIMENTAL') is not None
IGNORE_TORCH_VER = os.getenv('IGNORE_TORCH_VER') is not None
Expand Down
8 changes: 8 additions & 0 deletions tools/get_torchvision_ver.sh
Expand Up @@ -29,6 +29,10 @@ case $1 in
echo "0.11.2"
;;

"1.10.2")
echo "0.11.3"
;;

"1.11.0")
echo "0.12.0"
;;
Expand All @@ -37,6 +41,10 @@ case $1 in
echo "0.13.0"
;;

"1.12.1")
echo "0.13.1"
;;

*)
printf "ERROR $1 unsupported torch version\n" >&2
exit 3
Expand Down

0 comments on commit a00029e

Please sign in to comment.