File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed
scripts/tools/codegen/dest Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -109,8 +109,15 @@ static void upsample_nearest_out_dpcpp_kernel(
109109#endif
110110
111111 if (!src_ctx.is_plain ()) {
112- output = empty_opaque_tensor (
113- resampling_pd.dst_desc (), input.options (), c10::nullopt );
112+ if (input.is_quantized ()) {
113+ auto quantizer = dpcpp_make_per_tensor_affine_quantizer (
114+ input.q_scale (), input.q_zero_point (), input.scalar_type ());
115+ output = empty_opaque_qtensor (
116+ resampling_pd.dst_desc (), c10::nullopt , quantizer);
117+ } else {
118+ output = empty_opaque_tensor (
119+ resampling_pd.dst_desc (), input.options (), c10::nullopt );
120+ }
114121 }
115122 memory src_memory =
116123 dpcpp_onednn_memory (resampling_pd.src_desc (), eng, input.data_ptr ());
Original file line number Diff line number Diff line change @@ -264,10 +264,10 @@ class RegisterDispatchKey:
264264 'upsample_nearest3d' ,
265265 'upsample_nearest3d_backward_out' ,
266266 'upsample_nearest3d_backward' ,
267- # 'upsample_nearest2d_out',
268- # 'upsample_nearest2d',
269- # 'upsample_nearest2d_backward_out',
270- # 'upsample_nearest2d_backward',
267+ 'upsample_nearest2d_out' ,
268+ 'upsample_nearest2d' ,
269+ 'upsample_nearest2d_backward_out' ,
270+ 'upsample_nearest2d_backward' ,
271271 'upsample_nearest1d_out' ,
272272 'upsample_nearest1d' ,
273273 'upsample_nearest1d_backward_out' ,
You can’t perform that action at this time.
0 commit comments