@@ -48,7 +48,11 @@ def stencil_def(
48
48
out = pa * fa + pb * fb - pc * fc # type: ignore # noqa
49
49
50
50
51
- field_info_val = {0 : ("out" , "fa" ), 1 : ("out" , "fa" , "fb" ), 2 : ("out" , "fa" , "fb" , "fc" )}
51
+ field_info_val = {
52
+ 0 : ("out" , "fa" ),
53
+ 1 : ("out" , "fa" , "fb" ),
54
+ 2 : ("out" , "fa" , "fb" , "fc" ),
55
+ }
52
56
parameter_info_val = {0 : ("pa" ,), 1 : ("pa" , "pb" ), 2 : ("pa" , "pb" , "pc" )}
53
57
unreferenced_val = {0 : ("pb" , "fb" , "pc" , "fc" ), 1 : ("pc" , "fc" ), 2 : ()}
54
58
@@ -168,5 +172,23 @@ def test_toolchain_profiling(backend_name: str, mode: int, rebuild: bool):
168
172
assert build_info ["load_time" ] > 0.0
169
173
170
174
175
+ @pytest .mark .parametrize ("backend_name" , ["cuda" ])
176
+ def test_deprecation_gtc_cuda (backend_name : str ):
177
+ # Default deprecation, raise an error
178
+ build_info : Dict [str , Any ] = {}
179
+ builder = (
180
+ StencilBuilder (cast (StencilFunc , stencil_def ))
181
+ .with_backend (backend_name )
182
+ .with_externals ({"MODE" : 2 })
183
+ .with_options (
184
+ name = stencil_def .__name__ ,
185
+ module = stencil_def .__module__ ,
186
+ build_info = build_info ,
187
+ )
188
+ )
189
+ with pytest .raises (NotImplementedError ):
190
+ builder .build ()
191
+
192
+
171
193
if __name__ == "__main__" :
172
194
pytest .main ([__file__ ])
0 commit comments