@@ -69,8 +69,7 @@ def check_nightly_binaries_date(package: str) -> None:
6969 from datetime import datetime , timedelta
7070 format_dt = '%Y%m%d'
7171
72- torch_str = torch .__version__
73- date_t_str = re .findall ("dev\d+" , torch .__version__ )
72+ date_t_str = re .findall (r"dev\d+" , torch .__version__ )
7473 date_t_delta = datetime .now () - datetime .strptime (date_t_str [0 ][3 :], format_dt )
7574 if date_t_delta .days >= NIGHTLY_ALLOWED_DELTA :
7675 raise RuntimeError (
@@ -81,7 +80,7 @@ def check_nightly_binaries_date(package: str) -> None:
8180 for module in MODULES :
8281 imported_module = importlib .import_module (module ["name" ])
8382 module_version = imported_module .__version__
84- date_m_str = re .findall ("dev\d+" , module_version )
83+ date_m_str = re .findall (r "dev\d+" , module_version )
8584 date_m_delta = datetime .now () - datetime .strptime (date_m_str [0 ][3 :], format_dt )
8685 print (f"Nightly date check for { module ['name' ]} version { module_version } " )
8786 if date_m_delta .days > NIGHTLY_ALLOWED_DELTA :
@@ -102,7 +101,7 @@ def test_cuda_runtime_errors_captured() -> None:
102101 else :
103102 raise e
104103 if (cuda_exception_missed ):
105- raise RuntimeError ( f "Expected CUDA RuntimeError but have not received!" )
104+ raise RuntimeError ( "Expected CUDA RuntimeError but have not received!" )
106105
107106def smoke_test_cuda (package : str , runtime_error_check : str ) -> None :
108107 if not torch .cuda .is_available () and is_cuda_system :
@@ -145,27 +144,27 @@ def smoke_test_conv2d() -> None:
145144
146145 print ("Testing smoke_test_conv2d" )
147146 # With square kernels and equal stride
148- m = nn .Conv2d (16 , 33 , 3 , stride = 2 )
147+ nn .Conv2d (16 , 33 , 3 , stride = 2 )
149148 # non-square kernels and unequal stride and with padding
150- m = nn .Conv2d (16 , 33 , (3 , 5 ), stride = (2 , 1 ), padding = (4 , 2 ))
149+ nn .Conv2d (16 , 33 , (3 , 5 ), stride = (2 , 1 ), padding = (4 , 2 ))
151150 # non-square kernels and unequal stride and with padding and dilation
152151 basic_conv = nn .Conv2d (16 , 33 , (3 , 5 ), stride = (2 , 1 ), padding = (4 , 2 ), dilation = (3 , 1 ))
153152 input = torch .randn (20 , 16 , 50 , 100 )
154- output = basic_conv (input )
153+ basic_conv (input )
155154
156155 if is_cuda_system :
157156 print ("Testing smoke_test_conv2d with cuda" )
158157 conv = nn .Conv2d (3 , 3 , 3 ).cuda ()
159158 x = torch .randn (1 , 3 , 24 , 24 ).cuda ()
160159 with torch .cuda .amp .autocast ():
161- out = conv (x )
160+ conv (x )
162161
163162 supported_dtypes = [torch .float16 , torch .float32 , torch .float64 ]
164163 for dtype in supported_dtypes :
165164 print (f"Testing smoke_test_conv2d with cuda for { dtype } " )
166165 conv = basic_conv .to (dtype ).cuda ()
167166 input = torch .randn (20 , 16 , 50 , 100 , device = "cuda" ).type (dtype )
168- output = conv (input )
167+ conv (input )
169168
170169def smoke_test_linalg () -> None :
171170 print ("Testing smoke_test_linalg" )
0 commit comments