File tree 5 files changed +30
-6
lines changed
5 files changed +30
-6
lines changed Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ jobs:
157
157
sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit=${NVIDIA_CONTAINER_VERSION}
158
158
sudo systemctl restart docker
159
159
160
- DRIVER_FN="NVIDIA-Linux-x86_64-410.104 .run"
160
+ DRIVER_FN="NVIDIA-Linux-x86_64-440.59 .run"
161
161
wget "https://s3.amazonaws.com/ossci-linux/nvidia_driver/$DRIVER_FN"
162
162
sudo /bin/bash "$DRIVER_FN" -s --no-drm || (sudo cat /var/log/nvidia-installer.log && false)
163
163
nvidia-smi
Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ jobs:
157
157
sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit=${NVIDIA_CONTAINER_VERSION}
158
158
sudo systemctl restart docker
159
159
160
- DRIVER_FN="NVIDIA-Linux-x86_64-410.104 .run"
160
+ DRIVER_FN="NVIDIA-Linux-x86_64-440.59 .run"
161
161
wget "https://s3.amazonaws.com/ossci-linux/nvidia_driver/$DRIVER_FN"
162
162
sudo /bin/bash "$DRIVER_FN" -s --no-drm || (sudo cat /var/log/nvidia-installer.log && false)
163
163
nvidia-smi
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ def make_mesh_texture_atlas(
62
62
# the convention GL_REPEAT in OpenGL i.e the integer part of the coordinate
63
63
# will be ignored and a repeating pattern is formed.
64
64
# Shapenet data uses this format see:
65
- # https://shapenet.org/qaforum/index.php?qa=15&qa_1=why-is-the-texture-coordinate-in-the-obj-file-not-in-the-range
65
+ # https://shapenet.org/qaforum/index.php?qa=15&qa_1=why-is-the-texture-coordinate-in-the-obj-file-not-in-the-range # noqa: B950
66
66
if (faces_verts_uvs > 1 ).any () or (faces_verts_uvs < 0 ).any ():
67
67
msg = "Texture UV coordinates outside the range [0, 1]. \
68
68
The integer part will be ignored to form a repeating pattern."
Original file line number Diff line number Diff line change @@ -72,6 +72,18 @@ def get_extensions():
72
72
with open ("pytorch3d/__init__.py" , "r" ) as init :
73
73
exec (init .read ())
74
74
75
+
76
+ if os .getenv ("PYTORCH3D_NO_NINJA" , "0" ) == "1" :
77
+
78
+ class BuildExtension (torch .utils .cpp_extension .BuildExtension ):
79
+ def __init__ (self , * args , ** kwargs ):
80
+ super ().__init__ (use_ninja = False , * args , ** kwargs )
81
+
82
+
83
+ else :
84
+ BuildExtension = torch .utils .cpp_extension .BuildExtension
85
+
86
+
75
87
setup (
76
88
name = "pytorch3d" ,
77
89
version = __version__ ,
@@ -86,5 +98,5 @@ def get_extensions():
86
98
"dev" : ["flake8" , "isort" , "black==19.3b0" ],
87
99
},
88
100
ext_modules = get_extensions (),
89
- cmdclass = {"build_ext" : torch . utils . cpp_extension . BuildExtension },
101
+ cmdclass = {"build_ext" : BuildExtension },
90
102
)
Original file line number Diff line number Diff line change @@ -138,7 +138,19 @@ def assertClose(
138
138
)
139
139
140
140
if not close and msg is None :
141
- max_diff = backend .abs (input - other ).max ()
142
- self .fail (f"Not close. max diff { max_diff } ." )
141
+ diff = backend .abs (input - other ) + 0.0
142
+ ratio = diff / backend .abs (other )
143
+ try_relative = (diff <= atol ) | (backend .isfinite (ratio ) & (ratio > 0 ))
144
+ if try_relative .all ():
145
+ if backend == np :
146
+ # Avoid a weirdness with zero dimensional arrays.
147
+ ratio = np .array (ratio )
148
+ ratio [diff <= atol ] = 0
149
+ extra = f" Max relative diff { ratio .max ()} "
150
+ else :
151
+ extra = ""
152
+ shape = tuple (input .shape )
153
+ max_diff = diff .max ()
154
+ self .fail (f"Not close. Max diff { max_diff } .{ extra } Shape { shape } ." )
143
155
144
156
self .assertTrue (close , msg )
You can’t perform that action at this time.
0 commit comments