2525 assert_equal ,
2626 cache ,
2727 cpu_and_cuda ,
28- cvcuda_to_pil_compatible_tensor ,
2928 freeze_rng_state ,
3029 ignore_jit_no_profile_information_warning ,
3130 make_bounding_boxes ,
@@ -2846,14 +2845,14 @@ def test_functional(self, make_input):
28462845 (F .adjust_brightness_image , tv_tensors .Image ),
28472846 (F .adjust_brightness_video , tv_tensors .Video ),
28482847 pytest .param (
2849- F ._color ._adjust_brightness_cvcuda ,
2850- "cvcuda.Tensor" ,
2848+ F ._color ._adjust_brightness_image_cvcuda ,
2849+ None ,
28512850 marks = pytest .mark .skipif (not CVCUDA_AVAILABLE , reason = "CVCUDA not available" ),
28522851 ),
28532852 ],
28542853 )
28552854 def test_functional_signature (self , kernel , input_type ):
2856- if input_type == "cvcuda.Tensor" :
2855+ if kernel is F . _color . _adjust_brightness_image_cvcuda :
28572856 input_type = _import_cvcuda ().Tensor
28582857 check_functional_kernel_signature_match (F .adjust_brightness , kernel = kernel , input_type = input_type )
28592858
@@ -2873,7 +2872,7 @@ def test_image_correctness(self, make_input, brightness_factor):
28732872 actual = F .adjust_brightness (image , brightness_factor = brightness_factor )
28742873
28752874 if make_input is make_image_cvcuda :
2876- image = cvcuda_to_pil_compatible_tensor (image )
2875+ image = F . cvcuda_to_tensor (image )[ 0 ]. cpu ( )
28772876
28782877 expected = F .to_image (F .adjust_brightness (F .to_pil_image (image ), brightness_factor = brightness_factor ))
28792878
@@ -6111,14 +6110,14 @@ def test_functional(self, make_input):
61116110 (F .adjust_contrast_image , tv_tensors .Image ),
61126111 (F .adjust_contrast_video , tv_tensors .Video ),
61136112 pytest .param (
6114- F ._color ._adjust_contrast_cvcuda ,
6115- "cvcuda.Tensor" ,
6113+ F ._color ._adjust_contrast_image_cvcuda ,
6114+ None ,
61166115 marks = pytest .mark .skipif (not CVCUDA_AVAILABLE , reason = "CVCUDA not available" ),
61176116 ),
61186117 ],
61196118 )
61206119 def test_functional_signature (self , kernel , input_type ):
6121- if input_type == "cvcuda.Tensor" :
6120+ if kernel is F . _color . _adjust_contrast_image_cvcuda :
61226121 input_type = _import_cvcuda ().Tensor
61236122 check_functional_kernel_signature_match (F .adjust_contrast , kernel = kernel , input_type = input_type )
61246123
@@ -6145,7 +6144,7 @@ def test_correctness_image(self, make_input, contrast_factor):
61456144 actual = F .adjust_contrast (image , contrast_factor = contrast_factor )
61466145
61476146 if make_input is make_image_cvcuda :
6148- image = cvcuda_to_pil_compatible_tensor (image )
6147+ image = F . cvcuda_to_tensor (image )[ 0 ]. cpu ( )
61496148
61506149 expected = F .to_image (F .adjust_contrast (F .to_pil_image (image ), contrast_factor = contrast_factor ))
61516150
@@ -6224,14 +6223,14 @@ def test_functional(self, make_input):
62246223 (F .adjust_hue_image , tv_tensors .Image ),
62256224 (F .adjust_hue_video , tv_tensors .Video ),
62266225 pytest .param (
6227- F ._color ._adjust_hue_cvcuda ,
6228- "cvcuda.Tensor" ,
6226+ F ._color ._adjust_hue_image_cvcuda ,
6227+ None ,
62296228 marks = pytest .mark .skipif (not CVCUDA_AVAILABLE , reason = "CVCUDA not available" ),
62306229 ),
62316230 ],
62326231 )
62336232 def test_functional_signature (self , kernel , input_type ):
6234- if input_type == "cvcuda.Tensor" :
6233+ if kernel is F . _color . _adjust_hue_image_cvcuda :
62356234 input_type = _import_cvcuda ().Tensor
62366235 check_functional_kernel_signature_match (F .adjust_hue , kernel = kernel , input_type = input_type )
62376236
@@ -6259,8 +6258,8 @@ def test_correctness_image(self, make_input, hue_factor):
62596258 actual = F .adjust_hue (image , hue_factor = hue_factor )
62606259
62616260 if make_input is make_image_cvcuda :
6262- actual = cvcuda_to_pil_compatible_tensor (actual )
6263- image = cvcuda_to_pil_compatible_tensor (image )
6261+ actual = F . cvcuda_to_tensor (actual )[ 0 ]. cpu ( )
6262+ image = F . cvcuda_to_tensor (image )[ 0 ]. cpu ( )
62646263
62656264 expected = F .to_image (F .adjust_hue (F .to_pil_image (image ), hue_factor = hue_factor ))
62666265
@@ -6300,14 +6299,14 @@ def test_functional(self, make_input):
63006299 (F .adjust_saturation_image , tv_tensors .Image ),
63016300 (F .adjust_saturation_video , tv_tensors .Video ),
63026301 pytest .param (
6303- F ._color ._adjust_saturation_cvcuda ,
6304- "cvcuda.Tensor" ,
6302+ F ._color ._adjust_saturation_image_cvcuda ,
6303+ None ,
63056304 marks = pytest .mark .skipif (not CVCUDA_AVAILABLE , reason = "CVCUDA not available" ),
63066305 ),
63076306 ],
63086307 )
63096308 def test_functional_signature (self , kernel , input_type ):
6310- if input_type == "cvcuda.Tensor" :
6309+ if kernel is F . _color . _adjust_saturation_image_cvcuda :
63116310 input_type = _import_cvcuda ().Tensor
63126311 check_functional_kernel_signature_match (F .adjust_saturation , kernel = kernel , input_type = input_type )
63136312
@@ -6335,7 +6334,7 @@ def test_correctness_image(self, make_input, color_space, saturation_factor):
63356334 actual = F .adjust_saturation (image , saturation_factor = saturation_factor )
63366335
63376336 if make_input is make_image_cvcuda :
6338- image = cvcuda_to_pil_compatible_tensor (image )
6337+ image = F . cvcuda_to_tensor (image )[ 0 ]. cpu ( )
63396338
63406339 expected = F .to_image (F .adjust_saturation (F .to_pil_image (image ), saturation_factor = saturation_factor ))
63416340
0 commit comments