import torch
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid
from torch._C import _cuda_getCurrentRawStream as get_raw_stream
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
import torch.nn.parallel
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda


@triton.jit
def triton_poi_fused__to_copy__unsafe_index_add_arange_clamp_floor_mul_rsub_sub_0(
    in_out_ptr1, in_out_ptr2, in_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 1024
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x1 = xindex // 8 % 8
    x0 = xindex % 8
    x2 = xindex // 64
    x4 = xindex
    tmp0 = x1
    tmp1 = tmp0.to(tl.float32)
    tmp2 = 0.5
    tmp3 = tmp1 + tmp2
    tmp4 = tmp3 * tmp2
    tmp5 = tmp4 - tmp2
    tmp6 = libdevice.floor(tmp5)
    tmp7 = tmp6.to(tl.int32)
    tmp8 = tl.full([1], 1, tl.int64)
    tmp9 = tmp7 - tmp8
    tmp10 = tl.full([1], 0, tl.int64)
    tmp11 = triton_helpers.maximum(tmp9, tmp10)
    tmp12 = tl.full([1], 3, tl.int64)
    tmp13 = triton_helpers.minimum(tmp11, tmp12)
    tmp14 = x0
    tmp15 = tmp14.to(tl.float32)
    tmp16 = tmp15 + tmp2
    tmp17 = tmp16 * tmp2
    tmp18 = tmp17 - tmp2
    tmp19 = libdevice.floor(tmp18)
    tmp20 = tmp19.to(tl.int32)
    tmp21 = tmp20 - tmp8
    tmp22 = triton_helpers.maximum(tmp21, tmp10)
    tmp23 = triton_helpers.minimum(tmp22, tmp12)
    tmp24 = tl.load(in_ptr0 + (tmp23 + 4 * tmp13 + 16 * x2), xmask,
        eviction_policy='evict_last')
    tmp25 = tmp18 - tmp19
    tmp26 = 0.0
    tmp27 = triton_helpers.maximum(tmp25, tmp26)
    tmp28 = 1.0
    tmp29 = triton_helpers.minimum(tmp27, tmp28)
    tmp30 = tmp29 + tmp28
    tmp31 = -0.75
    tmp32 = tmp30 * tmp31
    tmp33 = -3.75
    tmp34 = tmp32 - tmp33
    tmp35 = tmp34 * tmp30
    tmp36 = -6.0
    tmp37 = tmp35 + tmp36
    tmp38 = tmp37 * tmp30
    tmp39 = -3.0
    tmp40 = tmp38 - tmp39
    tmp41 = tmp24 * tmp40
    tmp42 = triton_helpers.maximum(tmp20, tmp10)
    tmp43 = triton_helpers.minimum(tmp42, tmp12)
    tmp44 = tl.load(in_ptr0 + (tmp43 + 4 * tmp13 + 16 * x2), xmask,
        eviction_policy='evict_last')
    tmp45 = 1.25
    tmp46 = tmp29 * tmp45
    tmp47 = 2.25
    tmp48 = tmp46 - tmp47
    tmp49 = tmp48 * tmp29
    tmp50 = tmp49 * tmp29
    tmp51 = tmp50 + tmp28
    tmp52 = tmp44 * tmp51
    tmp53 = tmp20 + tmp8
    tmp54 = triton_helpers.maximum(tmp53, tmp10)
    tmp55 = triton_helpers.minimum(tmp54, tmp12)
    tmp56 = tl.load(in_ptr0 + (tmp55 + 4 * tmp13 + 16 * x2), xmask,
        eviction_policy='evict_last')
    tmp57 = tmp28 - tmp29
    tmp58 = tmp57 * tmp45
    tmp59 = tmp58 - tmp47
    tmp60 = tmp59 * tmp57
    tmp61 = tmp60 * tmp57
    tmp62 = tmp61 + tmp28
    tmp63 = tmp56 * tmp62
    tmp64 = tl.full([1], 2, tl.int64)
    tmp65 = tmp20 + tmp64
    tmp66 = triton_helpers.maximum(tmp65, tmp10)
    tmp67 = triton_helpers.minimum(tmp66, tmp12)
    tmp68 = tl.load(in_ptr0 + (tmp67 + 4 * tmp13 + 16 * x2), xmask,
        eviction_policy='evict_last')
    tmp69 = 2.0
    tmp70 = tmp69 - tmp29
    tmp71 = tmp70 * tmp31
    tmp72 = tmp71 - tmp33
    tmp73 = tmp72 * tmp70
    tmp74 = tmp73 + tmp36
    tmp75 = tmp74 * tmp70
    tmp76 = tmp75 - tmp39
    tmp77 = tmp68 * tmp76
    tmp78 = tmp41 + tmp52
    tmp79 = tmp78 + tmp63
    tmp80 = tmp79 + tmp77
    tmp81 = tmp5 - tmp6
    tmp82 = triton_helpers.maximum(tmp81, tmp26)
    tmp83 = triton_helpers.minimum(tmp82, tmp28)
    tmp84 = tmp83 + tmp28
    tmp85 = tmp84 * tmp31
    tmp86 = tmp85 - tmp33
    tmp87 = tmp86 * tmp84
    tmp88 = tmp87 + tmp36
    tmp89 = tmp88 * tmp84
    tmp90 = tmp89 - tmp39
    tmp91 = tmp80 * tmp90
    tmp92 = triton_helpers.maximum(tmp7, tmp10)
    tmp93 = triton_helpers.minimum(tmp92, tmp12)
    tmp94 = tl.load(in_ptr0 + (tmp23 + 4 * tmp93 + 16 * x2), xmask,
        eviction_policy='evict_last')
    tmp95 = tmp94 * tmp40
    tmp96 = tl.load(in_ptr0 + (tmp43 + 4 * tmp93 + 16 * x2), xmask,
        eviction_policy='evict_last')
    tmp97 = tmp96 * tmp51
    tmp98 = tl.load(in_ptr0 + (tmp55 + 4 * tmp93 + 16 * x2), xmask,
        eviction_policy='evict_last')
    tmp99 = tmp98 * tmp62
    tmp100 = tl.load(in_ptr0 + (tmp67 + 4 * tmp93 + 16 * x2), xmask,
        eviction_policy='evict_last')
    tmp101 = tmp100 * tmp76
    tmp102 = tmp7 + tmp8
    tmp103 = triton_helpers.maximum(tmp102, tmp10)
    tmp104 = triton_helpers.minimum(tmp103, tmp12)
    tmp105 = tl.load(in_ptr0 + (tmp23 + 4 * tmp104 + 16 * x2), xmask,
        eviction_policy='evict_last')
    tmp106 = tmp105 * tmp40
    tmp107 = tl.load(in_ptr0 + (tmp43 + 4 * tmp104 + 16 * x2), xmask,
        eviction_policy='evict_last')
    tmp108 = tmp107 * tmp51
    tmp109 = tl.load(in_ptr0 + (tmp55 + 4 * tmp104 + 16 * x2), xmask,
        eviction_policy='evict_last')
    tmp110 = tmp109 * tmp62
    tmp111 = tl.load(in_ptr0 + (tmp67 + 4 * tmp104 + 16 * x2), xmask,
        eviction_policy='evict_last')
    tmp112 = tmp111 * tmp76
    tmp113 = tmp95 + tmp97
    tmp114 = tmp113 + tmp99
    tmp115 = tmp114 + tmp101
    tmp116 = tmp83 * tmp45
    tmp117 = tmp116 - tmp47
    tmp118 = tmp117 * tmp83
    tmp119 = tmp118 * tmp83
    tmp120 = tmp119 + tmp28
    tmp121 = tmp115 * tmp120
    tmp122 = tmp91 + tmp121
    tmp123 = tmp106 + tmp108
    tmp124 = tmp123 + tmp110
    tmp125 = tmp124 + tmp112
    tmp126 = tmp28 - tmp83
    tmp127 = tmp126 * tmp45
    tmp128 = tmp127 - tmp47
    tmp129 = tmp128 * tmp126
    tmp130 = tmp129 * tmp126
    tmp131 = tmp130 + tmp28
    tmp132 = tmp125 * tmp131
    tmp133 = tmp122 + tmp132
    tmp134 = tmp7 + tmp64
    tmp135 = triton_helpers.maximum(tmp134, tmp10)
    tmp136 = triton_helpers.minimum(tmp135, tmp12)
    tmp137 = tl.load(in_ptr0 + (tmp23 + 4 * tmp136 + 16 * x2), xmask,
        eviction_policy='evict_last')
    tmp138 = tmp137 * tmp40
    tmp139 = tl.load(in_ptr0 + (tmp43 + 4 * tmp136 + 16 * x2), xmask,
        eviction_policy='evict_last')
    tmp140 = tmp139 * tmp51
    tmp141 = tl.load(in_ptr0 + (tmp55 + 4 * tmp136 + 16 * x2), xmask,
        eviction_policy='evict_last')
    tmp142 = tmp141 * tmp62
    tmp143 = tl.load(in_ptr0 + (tmp67 + 4 * tmp136 + 16 * x2), xmask,
        eviction_policy='evict_last')
    tmp144 = tmp143 * tmp76
    tmp145 = tmp138 + tmp140
    tmp146 = tmp145 + tmp142
    tmp147 = tmp146 + tmp144
    tmp148 = tmp69 - tmp83
    tmp149 = tmp148 * tmp31
    tmp150 = tmp149 - tmp33
    tmp151 = tmp150 * tmp148
    tmp152 = tmp151 + tmp36
    tmp153 = tmp152 * tmp148
    tmp154 = tmp153 - tmp39
    tmp155 = tmp147 * tmp154
    tl.store(in_out_ptr1 + x4, tmp133, xmask)
    tl.store(in_out_ptr2 + x4, tmp155, xmask)


@triton.jit
def triton_poi_fused__to_copy__unsafe_index_add_arange_clamp_floor_mul_rsub_sub_1(
    in_out_ptr0, in_out_ptr1, in_ptr0, in_ptr1, xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x1 = xindex // 16 % 16
    x0 = xindex % 16
    x2 = xindex // 256
    x4 = xindex
    tmp0 = x1
    tmp1 = tmp0.to(tl.float32)
    tmp2 = 0.5
    tmp3 = tmp1 + tmp2
    tmp4 = tmp3 * tmp2
    tmp5 = tmp4 - tmp2
    tmp6 = libdevice.floor(tmp5)
    tmp7 = tmp6.to(tl.int32)
    tmp8 = tl.full([1], 1, tl.int64)
    tmp9 = tmp7 - tmp8
    tmp10 = tl.full([1], 0, tl.int64)
    tmp11 = triton_helpers.maximum(tmp9, tmp10)
    tmp12 = tl.full([1], 7, tl.int64)
    tmp13 = triton_helpers.minimum(tmp11, tmp12)
    tmp14 = x0
    tmp15 = tmp14.to(tl.float32)
    tmp16 = tmp15 + tmp2
    tmp17 = tmp16 * tmp2
    tmp18 = tmp17 - tmp2
    tmp19 = libdevice.floor(tmp18)
    tmp20 = tmp19.to(tl.int32)
    tmp21 = tmp20 - tmp8
    tmp22 = triton_helpers.maximum(tmp21, tmp10)
    tmp23 = triton_helpers.minimum(tmp22, tmp12)
    tmp24 = tl.load(in_ptr0 + (tmp23 + 8 * tmp13 + 64 * x2), None,
        eviction_policy='evict_last')
    tmp25 = tl.load(in_ptr1 + (tmp23 + 8 * tmp13 + 64 * x2), None,
        eviction_policy='evict_last')
    tmp26 = tmp24 + tmp25
    tmp27 = tmp18 - tmp19
    tmp28 = 0.0
    tmp29 = triton_helpers.maximum(tmp27, tmp28)
    tmp30 = 1.0
    tmp31 = triton_helpers.minimum(tmp29, tmp30)
    tmp32 = tmp31 + tmp30
    tmp33 = -0.75
    tmp34 = tmp32 * tmp33
    tmp35 = -3.75
    tmp36 = tmp34 - tmp35
    tmp37 = tmp36 * tmp32
    tmp38 = -6.0
    tmp39 = tmp37 + tmp38
    tmp40 = tmp39 * tmp32
    tmp41 = -3.0
    tmp42 = tmp40 - tmp41
    tmp43 = tmp26 * tmp42
    tmp44 = triton_helpers.maximum(tmp20, tmp10)
    tmp45 = triton_helpers.minimum(tmp44, tmp12)
    tmp46 = tl.load(in_ptr0 + (tmp45 + 8 * tmp13 + 64 * x2), None,
        eviction_policy='evict_last')
    tmp47 = tl.load(in_ptr1 + (tmp45 + 8 * tmp13 + 64 * x2), None,
        eviction_policy='evict_last')
    tmp48 = tmp46 + tmp47
    tmp49 = 1.25
    tmp50 = tmp31 * tmp49
    tmp51 = 2.25
    tmp52 = tmp50 - tmp51
    tmp53 = tmp52 * tmp31
    tmp54 = tmp53 * tmp31
    tmp55 = tmp54 + tmp30
    tmp56 = tmp48 * tmp55
    tmp57 = tmp20 + tmp8
    tmp58 = triton_helpers.maximum(tmp57, tmp10)
    tmp59 = triton_helpers.minimum(tmp58, tmp12)
    tmp60 = tl.load(in_ptr0 + (tmp59 + 8 * tmp13 + 64 * x2), None,
        eviction_policy='evict_last')
    tmp61 = tl.load(in_ptr1 + (tmp59 + 8 * tmp13 + 64 * x2), None,
        eviction_policy='evict_last')
    tmp62 = tmp60 + tmp61
    tmp63 = tmp30 - tmp31
    tmp64 = tmp63 * tmp49
    tmp65 = tmp64 - tmp51
    tmp66 = tmp65 * tmp63
    tmp67 = tmp66 * tmp63
    tmp68 = tmp67 + tmp30
    tmp69 = tmp62 * tmp68
    tmp70 = tl.full([1], 2, tl.int64)
    tmp71 = tmp20 + tmp70
    tmp72 = triton_helpers.maximum(tmp71, tmp10)
    tmp73 = triton_helpers.minimum(tmp72, tmp12)
    tmp74 = tl.load(in_ptr0 + (tmp73 + 8 * tmp13 + 64 * x2), None,
        eviction_policy='evict_last')
    tmp75 = tl.load(in_ptr1 + (tmp73 + 8 * tmp13 + 64 * x2), None,
        eviction_policy='evict_last')
    tmp76 = tmp74 + tmp75
    tmp77 = 2.0
    tmp78 = tmp77 - tmp31
    tmp79 = tmp78 * tmp33
    tmp80 = tmp79 - tmp35
    tmp81 = tmp80 * tmp78
    tmp82 = tmp81 + tmp38
    tmp83 = tmp82 * tmp78
    tmp84 = tmp83 - tmp41
    tmp85 = tmp76 * tmp84
    tmp86 = tmp43 + tmp56
    tmp87 = tmp86 + tmp69
    tmp88 = tmp87 + tmp85
    tmp89 = tmp5 - tmp6
    tmp90 = triton_helpers.maximum(tmp89, tmp28)
    tmp91 = triton_helpers.minimum(tmp90, tmp30)
    tmp92 = tmp91 + tmp30
    tmp93 = tmp92 * tmp33
    tmp94 = tmp93 - tmp35
    tmp95 = tmp94 * tmp92
    tmp96 = tmp95 + tmp38
    tmp97 = tmp96 * tmp92
    tmp98 = tmp97 - tmp41
    tmp99 = tmp88 * tmp98
    tmp100 = triton_helpers.maximum(tmp7, tmp10)
    tmp101 = triton_helpers.minimum(tmp100, tmp12)
    tmp102 = tl.load(in_ptr0 + (tmp23 + 8 * tmp101 + 64 * x2), None,
        eviction_policy='evict_last')
    tmp103 = tl.load(in_ptr1 + (tmp23 + 8 * tmp101 + 64 * x2), None,
        eviction_policy='evict_last')
    tmp104 = tmp102 + tmp103
    tmp105 = tmp104 * tmp42
    tmp106 = tl.load(in_ptr0 + (tmp45 + 8 * tmp101 + 64 * x2), None,
        eviction_policy='evict_last')
    tmp107 = tl.load(in_ptr1 + (tmp45 + 8 * tmp101 + 64 * x2), None,
        eviction_policy='evict_last')
    tmp108 = tmp106 + tmp107
    tmp109 = tmp108 * tmp55
    tmp110 = tl.load(in_ptr0 + (tmp59 + 8 * tmp101 + 64 * x2), None,
        eviction_policy='evict_last')
    tmp111 = tl.load(in_ptr1 + (tmp59 + 8 * tmp101 + 64 * x2), None,
        eviction_policy='evict_last')
    tmp112 = tmp110 + tmp111
    tmp113 = tmp112 * tmp68
    tmp114 = tl.load(in_ptr0 + (tmp73 + 8 * tmp101 + 64 * x2), None,
        eviction_policy='evict_last')
    tmp115 = tl.load(in_ptr1 + (tmp73 + 8 * tmp101 + 64 * x2), None,
        eviction_policy='evict_last')
    tmp116 = tmp114 + tmp115
    tmp117 = tmp116 * tmp84
    tmp118 = tmp7 + tmp8
    tmp119 = triton_helpers.maximum(tmp118, tmp10)
    tmp120 = triton_helpers.minimum(tmp119, tmp12)
    tmp121 = tl.load(in_ptr0 + (tmp23 + 8 * tmp120 + 64 * x2), None,
        eviction_policy='evict_last')
    tmp122 = tl.load(in_ptr1 + (tmp23 + 8 * tmp120 + 64 * x2), None,
        eviction_policy='evict_last')
    tmp123 = tmp121 + tmp122
    tmp124 = tmp123 * tmp42
    tmp125 = tl.load(in_ptr0 + (tmp45 + 8 * tmp120 + 64 * x2), None,
        eviction_policy='evict_last')
    tmp126 = tl.load(in_ptr1 + (tmp45 + 8 * tmp120 + 64 * x2), None,
        eviction_policy='evict_last')
    tmp127 = tmp125 + tmp126
    tmp128 = tmp127 * tmp55
    tmp129 = tl.load(in_ptr0 + (tmp59 + 8 * tmp120 + 64 * x2), None,
        eviction_policy='evict_last')
    tmp130 = tl.load(in_ptr1 + (tmp59 + 8 * tmp120 + 64 * x2), None,
        eviction_policy='evict_last')
    tmp131 = tmp129 + tmp130
    tmp132 = tmp131 * tmp68
    tmp133 = tl.load(in_ptr0 + (tmp73 + 8 * tmp120 + 64 * x2), None,
        eviction_policy='evict_last')
    tmp134 = tl.load(in_ptr1 + (tmp73 + 8 * tmp120 + 64 * x2), None,
        eviction_policy='evict_last')
    tmp135 = tmp133 + tmp134
    tmp136 = tmp135 * tmp84
    tmp137 = tmp105 + tmp109
    tmp138 = tmp137 + tmp113
    tmp139 = tmp138 + tmp117
    tmp140 = tmp91 * tmp49
    tmp141 = tmp140 - tmp51
    tmp142 = tmp141 * tmp91
    tmp143 = tmp142 * tmp91
    tmp144 = tmp143 + tmp30
    tmp145 = tmp139 * tmp144
    tmp146 = tmp99 + tmp145
    tmp147 = tmp124 + tmp128
    tmp148 = tmp147 + tmp132
    tmp149 = tmp148 + tmp136
    tmp150 = tmp30 - tmp91
    tmp151 = tmp150 * tmp49
    tmp152 = tmp151 - tmp51
    tmp153 = tmp152 * tmp150
    tmp154 = tmp153 * tmp150
    tmp155 = tmp154 + tmp30
    tmp156 = tmp149 * tmp155
    tmp157 = tmp146 + tmp156
    tmp158 = tmp7 + tmp70
    tmp159 = triton_helpers.maximum(tmp158, tmp10)
    tmp160 = triton_helpers.minimum(tmp159, tmp12)
    tmp161 = tl.load(in_ptr0 + (tmp23 + 8 * tmp160 + 64 * x2), None,
        eviction_policy='evict_last')
    tmp162 = tl.load(in_ptr1 + (tmp23 + 8 * tmp160 + 64 * x2), None,
        eviction_policy='evict_last')
    tmp163 = tmp161 + tmp162
    tmp164 = tmp163 * tmp42
    tmp165 = tl.load(in_ptr0 + (tmp45 + 8 * tmp160 + 64 * x2), None,
        eviction_policy='evict_last')
    tmp166 = tl.load(in_ptr1 + (tmp45 + 8 * tmp160 + 64 * x2), None,
        eviction_policy='evict_last')
    tmp167 = tmp165 + tmp166
    tmp168 = tmp167 * tmp55
    tmp169 = tl.load(in_ptr0 + (tmp59 + 8 * tmp160 + 64 * x2), None,
        eviction_policy='evict_last')
    tmp170 = tl.load(in_ptr1 + (tmp59 + 8 * tmp160 + 64 * x2), None,
        eviction_policy='evict_last')
    tmp171 = tmp169 + tmp170
    tmp172 = tmp171 * tmp68
    tmp173 = tl.load(in_ptr0 + (tmp73 + 8 * tmp160 + 64 * x2), None,
        eviction_policy='evict_last')
    tmp174 = tl.load(in_ptr1 + (tmp73 + 8 * tmp160 + 64 * x2), None,
        eviction_policy='evict_last')
    tmp175 = tmp173 + tmp174
    tmp176 = tmp175 * tmp84
    tmp177 = tmp164 + tmp168
    tmp178 = tmp177 + tmp172
    tmp179 = tmp178 + tmp176
    tmp180 = tmp77 - tmp91
    tmp181 = tmp180 * tmp33
    tmp182 = tmp181 - tmp35
    tmp183 = tmp182 * tmp180
    tmp184 = tmp183 + tmp38
    tmp185 = tmp184 * tmp180
    tmp186 = tmp185 - tmp41
    tmp187 = tmp179 * tmp186
    tl.store(in_out_ptr0 + x4, tmp157, None)
    tl.store(in_out_ptr1 + x4, tmp187, None)


@triton.jit
def triton_poi_fused__to_copy__unsafe_index_add_arange_clamp_floor_mul_rsub_sub_2(
    in_out_ptr0, in_out_ptr1, in_ptr0, in_ptr1, xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x1 = xindex // 32 % 32
    x0 = xindex % 32
    x2 = xindex // 1024
    x4 = xindex
    tmp0 = x1
    tmp1 = tmp0.to(tl.float32)
    tmp2 = 0.5
    tmp3 = tmp1 + tmp2
    tmp4 = tmp3 * tmp2
    tmp5 = tmp4 - tmp2
    tmp6 = libdevice.floor(tmp5)
    tmp7 = tmp6.to(tl.int32)
    tmp8 = tl.full([1], 1, tl.int64)
    tmp9 = tmp7 - tmp8
    tmp10 = tl.full([1], 0, tl.int64)
    tmp11 = triton_helpers.maximum(tmp9, tmp10)
    tmp12 = tl.full([1], 15, tl.int64)
    tmp13 = triton_helpers.minimum(tmp11, tmp12)
    tmp14 = x0
    tmp15 = tmp14.to(tl.float32)
    tmp16 = tmp15 + tmp2
    tmp17 = tmp16 * tmp2
    tmp18 = tmp17 - tmp2
    tmp19 = libdevice.floor(tmp18)
    tmp20 = tmp19.to(tl.int32)
    tmp21 = tmp20 - tmp8
    tmp22 = triton_helpers.maximum(tmp21, tmp10)
    tmp23 = triton_helpers.minimum(tmp22, tmp12)
    tmp24 = tl.load(in_ptr0 + (tmp23 + 16 * tmp13 + 256 * x2), None,
        eviction_policy='evict_last')
    tmp25 = tl.load(in_ptr1 + (tmp23 + 16 * tmp13 + 256 * x2), None,
        eviction_policy='evict_last')
    tmp26 = tmp24 + tmp25
    tmp27 = tmp18 - tmp19
    tmp28 = 0.0
    tmp29 = triton_helpers.maximum(tmp27, tmp28)
    tmp30 = 1.0
    tmp31 = triton_helpers.minimum(tmp29, tmp30)
    tmp32 = tmp31 + tmp30
    tmp33 = -0.75
    tmp34 = tmp32 * tmp33
    tmp35 = -3.75
    tmp36 = tmp34 - tmp35
    tmp37 = tmp36 * tmp32
    tmp38 = -6.0
    tmp39 = tmp37 + tmp38
    tmp40 = tmp39 * tmp32
    tmp41 = -3.0
    tmp42 = tmp40 - tmp41
    tmp43 = tmp26 * tmp42
    tmp44 = triton_helpers.maximum(tmp20, tmp10)
    tmp45 = triton_helpers.minimum(tmp44, tmp12)
    tmp46 = tl.load(in_ptr0 + (tmp45 + 16 * tmp13 + 256 * x2), None,
        eviction_policy='evict_last')
    tmp47 = tl.load(in_ptr1 + (tmp45 + 16 * tmp13 + 256 * x2), None,
        eviction_policy='evict_last')
    tmp48 = tmp46 + tmp47
    tmp49 = 1.25
    tmp50 = tmp31 * tmp49
    tmp51 = 2.25
    tmp52 = tmp50 - tmp51
    tmp53 = tmp52 * tmp31
    tmp54 = tmp53 * tmp31
    tmp55 = tmp54 + tmp30
    tmp56 = tmp48 * tmp55
    tmp57 = tmp20 + tmp8
    tmp58 = triton_helpers.maximum(tmp57, tmp10)
    tmp59 = triton_helpers.minimum(tmp58, tmp12)
    tmp60 = tl.load(in_ptr0 + (tmp59 + 16 * tmp13 + 256 * x2), None,
        eviction_policy='evict_last')
    tmp61 = tl.load(in_ptr1 + (tmp59 + 16 * tmp13 + 256 * x2), None,
        eviction_policy='evict_last')
    tmp62 = tmp60 + tmp61
    tmp63 = tmp30 - tmp31
    tmp64 = tmp63 * tmp49
    tmp65 = tmp64 - tmp51
    tmp66 = tmp65 * tmp63
    tmp67 = tmp66 * tmp63
    tmp68 = tmp67 + tmp30
    tmp69 = tmp62 * tmp68
    tmp70 = tl.full([1], 2, tl.int64)
    tmp71 = tmp20 + tmp70
    tmp72 = triton_helpers.maximum(tmp71, tmp10)
    tmp73 = triton_helpers.minimum(tmp72, tmp12)
    tmp74 = tl.load(in_ptr0 + (tmp73 + 16 * tmp13 + 256 * x2), None,
        eviction_policy='evict_last')
    tmp75 = tl.load(in_ptr1 + (tmp73 + 16 * tmp13 + 256 * x2), None,
        eviction_policy='evict_last')
    tmp76 = tmp74 + tmp75
    tmp77 = 2.0
    tmp78 = tmp77 - tmp31
    tmp79 = tmp78 * tmp33
    tmp80 = tmp79 - tmp35
    tmp81 = tmp80 * tmp78
    tmp82 = tmp81 + tmp38
    tmp83 = tmp82 * tmp78
    tmp84 = tmp83 - tmp41
    tmp85 = tmp76 * tmp84
    tmp86 = tmp43 + tmp56
    tmp87 = tmp86 + tmp69
    tmp88 = tmp87 + tmp85
    tmp89 = tmp5 - tmp6
    tmp90 = triton_helpers.maximum(tmp89, tmp28)
    tmp91 = triton_helpers.minimum(tmp90, tmp30)
    tmp92 = tmp91 + tmp30
    tmp93 = tmp92 * tmp33
    tmp94 = tmp93 - tmp35
    tmp95 = tmp94 * tmp92
    tmp96 = tmp95 + tmp38
    tmp97 = tmp96 * tmp92
    tmp98 = tmp97 - tmp41
    tmp99 = tmp88 * tmp98
    tmp100 = triton_helpers.maximum(tmp7, tmp10)
    tmp101 = triton_helpers.minimum(tmp100, tmp12)
    tmp102 = tl.load(in_ptr0 + (tmp23 + 16 * tmp101 + 256 * x2), None,
        eviction_policy='evict_last')
    tmp103 = tl.load(in_ptr1 + (tmp23 + 16 * tmp101 + 256 * x2), None,
        eviction_policy='evict_last')
    tmp104 = tmp102 + tmp103
    tmp105 = tmp104 * tmp42
    tmp106 = tl.load(in_ptr0 + (tmp45 + 16 * tmp101 + 256 * x2), None,
        eviction_policy='evict_last')
    tmp107 = tl.load(in_ptr1 + (tmp45 + 16 * tmp101 + 256 * x2), None,
        eviction_policy='evict_last')
    tmp108 = tmp106 + tmp107
    tmp109 = tmp108 * tmp55
    tmp110 = tl.load(in_ptr0 + (tmp59 + 16 * tmp101 + 256 * x2), None,
        eviction_policy='evict_last')
    tmp111 = tl.load(in_ptr1 + (tmp59 + 16 * tmp101 + 256 * x2), None,
        eviction_policy='evict_last')
    tmp112 = tmp110 + tmp111
    tmp113 = tmp112 * tmp68
    tmp114 = tl.load(in_ptr0 + (tmp73 + 16 * tmp101 + 256 * x2), None,
        eviction_policy='evict_last')
    tmp115 = tl.load(in_ptr1 + (tmp73 + 16 * tmp101 + 256 * x2), None,
        eviction_policy='evict_last')
    tmp116 = tmp114 + tmp115
    tmp117 = tmp116 * tmp84
    tmp118 = tmp7 + tmp8
    tmp119 = triton_helpers.maximum(tmp118, tmp10)
    tmp120 = triton_helpers.minimum(tmp119, tmp12)
    tmp121 = tl.load(in_ptr0 + (tmp23 + 16 * tmp120 + 256 * x2), None,
        eviction_policy='evict_last')
    tmp122 = tl.load(in_ptr1 + (tmp23 + 16 * tmp120 + 256 * x2), None,
        eviction_policy='evict_last')
    tmp123 = tmp121 + tmp122
    tmp124 = tmp123 * tmp42
    tmp125 = tl.load(in_ptr0 + (tmp45 + 16 * tmp120 + 256 * x2), None,
        eviction_policy='evict_last')
    tmp126 = tl.load(in_ptr1 + (tmp45 + 16 * tmp120 + 256 * x2), None,
        eviction_policy='evict_last')
    tmp127 = tmp125 + tmp126
    tmp128 = tmp127 * tmp55
    tmp129 = tl.load(in_ptr0 + (tmp59 + 16 * tmp120 + 256 * x2), None,
        eviction_policy='evict_last')
    tmp130 = tl.load(in_ptr1 + (tmp59 + 16 * tmp120 + 256 * x2), None,
        eviction_policy='evict_last')
    tmp131 = tmp129 + tmp130
    tmp132 = tmp131 * tmp68
    tmp133 = tl.load(in_ptr0 + (tmp73 + 16 * tmp120 + 256 * x2), None,
        eviction_policy='evict_last')
    tmp134 = tl.load(in_ptr1 + (tmp73 + 16 * tmp120 + 256 * x2), None,
        eviction_policy='evict_last')
    tmp135 = tmp133 + tmp134
    tmp136 = tmp135 * tmp84
    tmp137 = tmp105 + tmp109
    tmp138 = tmp137 + tmp113
    tmp139 = tmp138 + tmp117
    tmp140 = tmp91 * tmp49
    tmp141 = tmp140 - tmp51
    tmp142 = tmp141 * tmp91
    tmp143 = tmp142 * tmp91
    tmp144 = tmp143 + tmp30
    tmp145 = tmp139 * tmp144
    tmp146 = tmp99 + tmp145
    tmp147 = tmp124 + tmp128
    tmp148 = tmp147 + tmp132
    tmp149 = tmp148 + tmp136
    tmp150 = tmp30 - tmp91
    tmp151 = tmp150 * tmp49
    tmp152 = tmp151 - tmp51
    tmp153 = tmp152 * tmp150
    tmp154 = tmp153 * tmp150
    tmp155 = tmp154 + tmp30
    tmp156 = tmp149 * tmp155
    tmp157 = tmp146 + tmp156
    tmp158 = tmp7 + tmp70
    tmp159 = triton_helpers.maximum(tmp158, tmp10)
    tmp160 = triton_helpers.minimum(tmp159, tmp12)
    tmp161 = tl.load(in_ptr0 + (tmp23 + 16 * tmp160 + 256 * x2), None,
        eviction_policy='evict_last')
    tmp162 = tl.load(in_ptr1 + (tmp23 + 16 * tmp160 + 256 * x2), None,
        eviction_policy='evict_last')
    tmp163 = tmp161 + tmp162
    tmp164 = tmp163 * tmp42
    tmp165 = tl.load(in_ptr0 + (tmp45 + 16 * tmp160 + 256 * x2), None,
        eviction_policy='evict_last')
    tmp166 = tl.load(in_ptr1 + (tmp45 + 16 * tmp160 + 256 * x2), None,
        eviction_policy='evict_last')
    tmp167 = tmp165 + tmp166
    tmp168 = tmp167 * tmp55
    tmp169 = tl.load(in_ptr0 + (tmp59 + 16 * tmp160 + 256 * x2), None,
        eviction_policy='evict_last')
    tmp170 = tl.load(in_ptr1 + (tmp59 + 16 * tmp160 + 256 * x2), None,
        eviction_policy='evict_last')
    tmp171 = tmp169 + tmp170
    tmp172 = tmp171 * tmp68
    tmp173 = tl.load(in_ptr0 + (tmp73 + 16 * tmp160 + 256 * x2), None,
        eviction_policy='evict_last')
    tmp174 = tl.load(in_ptr1 + (tmp73 + 16 * tmp160 + 256 * x2), None,
        eviction_policy='evict_last')
    tmp175 = tmp173 + tmp174
    tmp176 = tmp175 * tmp84
    tmp177 = tmp164 + tmp168
    tmp178 = tmp177 + tmp172
    tmp179 = tmp178 + tmp176
    tmp180 = tmp77 - tmp91
    tmp181 = tmp180 * tmp33
    tmp182 = tmp181 - tmp35
    tmp183 = tmp182 * tmp180
    tmp184 = tmp183 + tmp38
    tmp185 = tmp184 * tmp180
    tmp186 = tmp185 - tmp41
    tmp187 = tmp179 * tmp186
    tl.store(in_out_ptr0 + x4, tmp157, None)
    tl.store(in_out_ptr1 + x4, tmp187, None)


@triton.jit
def triton_poi_fused__to_copy__unsafe_index_add_arange_clamp_floor_mul_rsub_sub_3(
    in_out_ptr0, in_ptr0, in_ptr1, xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x1 = xindex // 64 % 64
    x0 = xindex % 64
    x2 = xindex // 4096
    x3 = xindex
    tmp0 = x1
    tmp1 = tmp0.to(tl.float32)
    tmp2 = 0.5
    tmp3 = tmp1 + tmp2
    tmp4 = tmp3 * tmp2
    tmp5 = tmp4 - tmp2
    tmp6 = libdevice.floor(tmp5)
    tmp7 = tmp6.to(tl.int32)
    tmp8 = tl.full([1], 1, tl.int64)
    tmp9 = tmp7 - tmp8
    tmp10 = tl.full([1], 0, tl.int64)
    tmp11 = triton_helpers.maximum(tmp9, tmp10)
    tmp12 = tl.full([1], 31, tl.int64)
    tmp13 = triton_helpers.minimum(tmp11, tmp12)
    tmp14 = x0
    tmp15 = tmp14.to(tl.float32)
    tmp16 = tmp15 + tmp2
    tmp17 = tmp16 * tmp2
    tmp18 = tmp17 - tmp2
    tmp19 = libdevice.floor(tmp18)
    tmp20 = tmp19.to(tl.int32)
    tmp21 = tmp20 - tmp8
    tmp22 = triton_helpers.maximum(tmp21, tmp10)
    tmp23 = triton_helpers.minimum(tmp22, tmp12)
    tmp24 = tl.load(in_ptr0 + (tmp23 + 32 * tmp13 + 1024 * x2), None,
        eviction_policy='evict_last')
    tmp25 = tl.load(in_ptr1 + (tmp23 + 32 * tmp13 + 1024 * x2), None,
        eviction_policy='evict_last')
    tmp26 = tmp24 + tmp25
    tmp27 = tmp18 - tmp19
    tmp28 = 0.0
    tmp29 = triton_helpers.maximum(tmp27, tmp28)
    tmp30 = 1.0
    tmp31 = triton_helpers.minimum(tmp29, tmp30)
    tmp32 = tmp31 + tmp30
    tmp33 = -0.75
    tmp34 = tmp32 * tmp33
    tmp35 = -3.75
    tmp36 = tmp34 - tmp35
    tmp37 = tmp36 * tmp32
    tmp38 = -6.0
    tmp39 = tmp37 + tmp38
    tmp40 = tmp39 * tmp32
    tmp41 = -3.0
    tmp42 = tmp40 - tmp41
    tmp43 = tmp26 * tmp42
    tmp44 = triton_helpers.maximum(tmp20, tmp10)
    tmp45 = triton_helpers.minimum(tmp44, tmp12)
    tmp46 = tl.load(in_ptr0 + (tmp45 + 32 * tmp13 + 1024 * x2), None,
        eviction_policy='evict_last')
    tmp47 = tl.load(in_ptr1 + (tmp45 + 32 * tmp13 + 1024 * x2), None,
        eviction_policy='evict_last')
    tmp48 = tmp46 + tmp47
    tmp49 = 1.25
    tmp50 = tmp31 * tmp49
    tmp51 = 2.25
    tmp52 = tmp50 - tmp51
    tmp53 = tmp52 * tmp31
    tmp54 = tmp53 * tmp31
    tmp55 = tmp54 + tmp30
    tmp56 = tmp48 * tmp55
    tmp57 = tmp20 + tmp8
    tmp58 = triton_helpers.maximum(tmp57, tmp10)
    tmp59 = triton_helpers.minimum(tmp58, tmp12)
    tmp60 = tl.load(in_ptr0 + (tmp59 + 32 * tmp13 + 1024 * x2), None,
        eviction_policy='evict_last')
    tmp61 = tl.load(in_ptr1 + (tmp59 + 32 * tmp13 + 1024 * x2), None,
        eviction_policy='evict_last')
    tmp62 = tmp60 + tmp61
    tmp63 = tmp30 - tmp31
    tmp64 = tmp63 * tmp49
    tmp65 = tmp64 - tmp51
    tmp66 = tmp65 * tmp63
    tmp67 = tmp66 * tmp63
    tmp68 = tmp67 + tmp30
    tmp69 = tmp62 * tmp68
    tmp70 = tl.full([1], 2, tl.int64)
    tmp71 = tmp20 + tmp70
    tmp72 = triton_helpers.maximum(tmp71, tmp10)
    tmp73 = triton_helpers.minimum(tmp72, tmp12)
    tmp74 = tl.load(in_ptr0 + (tmp73 + 32 * tmp13 + 1024 * x2), None,
        eviction_policy='evict_last')
    tmp75 = tl.load(in_ptr1 + (tmp73 + 32 * tmp13 + 1024 * x2), None,
        eviction_policy='evict_last')
    tmp76 = tmp74 + tmp75
    tmp77 = 2.0
    tmp78 = tmp77 - tmp31
    tmp79 = tmp78 * tmp33
    tmp80 = tmp79 - tmp35
    tmp81 = tmp80 * tmp78
    tmp82 = tmp81 + tmp38
    tmp83 = tmp82 * tmp78
    tmp84 = tmp83 - tmp41
    tmp85 = tmp76 * tmp84
    tmp86 = tmp43 + tmp56
    tmp87 = tmp86 + tmp69
    tmp88 = tmp87 + tmp85
    tmp89 = tmp5 - tmp6
    tmp90 = triton_helpers.maximum(tmp89, tmp28)
    tmp91 = triton_helpers.minimum(tmp90, tmp30)
    tmp92 = tmp91 + tmp30
    tmp93 = tmp92 * tmp33
    tmp94 = tmp93 - tmp35
    tmp95 = tmp94 * tmp92
    tmp96 = tmp95 + tmp38
    tmp97 = tmp96 * tmp92
    tmp98 = tmp97 - tmp41
    tmp99 = tmp88 * tmp98
    tmp100 = triton_helpers.maximum(tmp7, tmp10)
    tmp101 = triton_helpers.minimum(tmp100, tmp12)
    tmp102 = tl.load(in_ptr0 + (tmp23 + 32 * tmp101 + 1024 * x2), None,
        eviction_policy='evict_last')
    tmp103 = tl.load(in_ptr1 + (tmp23 + 32 * tmp101 + 1024 * x2), None,
        eviction_policy='evict_last')
    tmp104 = tmp102 + tmp103
    tmp105 = tmp104 * tmp42
    tmp106 = tl.load(in_ptr0 + (tmp45 + 32 * tmp101 + 1024 * x2), None,
        eviction_policy='evict_last')
    tmp107 = tl.load(in_ptr1 + (tmp45 + 32 * tmp101 + 1024 * x2), None,
        eviction_policy='evict_last')
    tmp108 = tmp106 + tmp107
    tmp109 = tmp108 * tmp55
    tmp110 = tl.load(in_ptr0 + (tmp59 + 32 * tmp101 + 1024 * x2), None,
        eviction_policy='evict_last')
    tmp111 = tl.load(in_ptr1 + (tmp59 + 32 * tmp101 + 1024 * x2), None,
        eviction_policy='evict_last')
    tmp112 = tmp110 + tmp111
    tmp113 = tmp112 * tmp68
    tmp114 = tl.load(in_ptr0 + (tmp73 + 32 * tmp101 + 1024 * x2), None,
        eviction_policy='evict_last')
    tmp115 = tl.load(in_ptr1 + (tmp73 + 32 * tmp101 + 1024 * x2), None,
        eviction_policy='evict_last')
    tmp116 = tmp114 + tmp115
    tmp117 = tmp116 * tmp84
    tmp118 = tmp7 + tmp8
    tmp119 = triton_helpers.maximum(tmp118, tmp10)
    tmp120 = triton_helpers.minimum(tmp119, tmp12)
    tmp121 = tl.load(in_ptr0 + (tmp23 + 32 * tmp120 + 1024 * x2), None,
        eviction_policy='evict_last')
    tmp122 = tl.load(in_ptr1 + (tmp23 + 32 * tmp120 + 1024 * x2), None,
        eviction_policy='evict_last')
    tmp123 = tmp121 + tmp122
    tmp124 = tmp123 * tmp42
    tmp125 = tl.load(in_ptr0 + (tmp45 + 32 * tmp120 + 1024 * x2), None,
        eviction_policy='evict_last')
    tmp126 = tl.load(in_ptr1 + (tmp45 + 32 * tmp120 + 1024 * x2), None,
        eviction_policy='evict_last')
    tmp127 = tmp125 + tmp126
    tmp128 = tmp127 * tmp55
    tmp129 = tl.load(in_ptr0 + (tmp59 + 32 * tmp120 + 1024 * x2), None,
        eviction_policy='evict_last')
    tmp130 = tl.load(in_ptr1 + (tmp59 + 32 * tmp120 + 1024 * x2), None,
        eviction_policy='evict_last')
    tmp131 = tmp129 + tmp130
    tmp132 = tmp131 * tmp68
    tmp133 = tl.load(in_ptr0 + (tmp73 + 32 * tmp120 + 1024 * x2), None,
        eviction_policy='evict_last')
    tmp134 = tl.load(in_ptr1 + (tmp73 + 32 * tmp120 + 1024 * x2), None,
        eviction_policy='evict_last')
    tmp135 = tmp133 + tmp134
    tmp136 = tmp135 * tmp84
    tmp137 = tmp105 + tmp109
    tmp138 = tmp137 + tmp113
    tmp139 = tmp138 + tmp117
    tmp140 = tmp91 * tmp49
    tmp141 = tmp140 - tmp51
    tmp142 = tmp141 * tmp91
    tmp143 = tmp142 * tmp91
    tmp144 = tmp143 + tmp30
    tmp145 = tmp139 * tmp144
    tmp146 = tmp99 + tmp145
    tmp147 = tmp124 + tmp128
    tmp148 = tmp147 + tmp132
    tmp149 = tmp148 + tmp136
    tmp150 = tmp30 - tmp91
    tmp151 = tmp150 * tmp49
    tmp152 = tmp151 - tmp51
    tmp153 = tmp152 * tmp150
    tmp154 = tmp153 * tmp150
    tmp155 = tmp154 + tmp30
    tmp156 = tmp149 * tmp155
    tmp157 = tmp146 + tmp156
    tmp158 = tmp7 + tmp70
    tmp159 = triton_helpers.maximum(tmp158, tmp10)
    tmp160 = triton_helpers.minimum(tmp159, tmp12)
    tmp161 = tl.load(in_ptr0 + (tmp23 + 32 * tmp160 + 1024 * x2), None,
        eviction_policy='evict_last')
    tmp162 = tl.load(in_ptr1 + (tmp23 + 32 * tmp160 + 1024 * x2), None,
        eviction_policy='evict_last')
    tmp163 = tmp161 + tmp162
    tmp164 = tmp163 * tmp42
    tmp165 = tl.load(in_ptr0 + (tmp45 + 32 * tmp160 + 1024 * x2), None,
        eviction_policy='evict_last')
    tmp166 = tl.load(in_ptr1 + (tmp45 + 32 * tmp160 + 1024 * x2), None,
        eviction_policy='evict_last')
    tmp167 = tmp165 + tmp166
    tmp168 = tmp167 * tmp55
    tmp169 = tl.load(in_ptr0 + (tmp59 + 32 * tmp160 + 1024 * x2), None,
        eviction_policy='evict_last')
    tmp170 = tl.load(in_ptr1 + (tmp59 + 32 * tmp160 + 1024 * x2), None,
        eviction_policy='evict_last')
    tmp171 = tmp169 + tmp170
    tmp172 = tmp171 * tmp68
    tmp173 = tl.load(in_ptr0 + (tmp73 + 32 * tmp160 + 1024 * x2), None,
        eviction_policy='evict_last')
    tmp174 = tl.load(in_ptr1 + (tmp73 + 32 * tmp160 + 1024 * x2), None,
        eviction_policy='evict_last')
    tmp175 = tmp173 + tmp174
    tmp176 = tmp175 * tmp84
    tmp177 = tmp164 + tmp168
    tmp178 = tmp177 + tmp172
    tmp179 = tmp178 + tmp176
    tmp180 = tmp77 - tmp91
    tmp181 = tmp180 * tmp33
    tmp182 = tmp181 - tmp35
    tmp183 = tmp182 * tmp180
    tmp184 = tmp183 + tmp38
    tmp185 = tmp184 * tmp180
    tmp186 = tmp185 - tmp41
    tmp187 = tmp179 * tmp186
    tmp188 = tmp157 + tmp187
    tl.store(in_out_ptr0 + x3, tmp188, None)


def call(args):
    arg0_1, = args
    args.clear()
    assert_size_stride(arg0_1, (4, 4, 4, 4), (64, 16, 4, 1))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf10 = empty_strided_cuda((4, 4, 8, 8), (256, 64, 8, 1), torch.float32
            )
        buf13 = buf10
        del buf10
        buf14 = empty_strided_cuda((4, 4, 8, 8), (256, 64, 8, 1), torch.float32
            )
        buf18 = buf14
        del buf14
        get_raw_stream(0)
        triton_poi_fused__to_copy__unsafe_index_add_arange_clamp_floor_mul_rsub_sub_0[
            grid(1024)](buf13, buf18, arg0_1, 1024, XBLOCK=128, num_warps=4,
            num_stages=1)
        del arg0_1
        buf19 = empty_strided_cuda((4, 4, 16, 16), (1024, 256, 16, 1),
            torch.float32)
        buf23 = buf19
        del buf19
        buf32 = buf23
        del buf23
        buf33 = empty_strided_cuda((4, 4, 16, 16), (1024, 256, 16, 1),
            torch.float32)
        buf37 = buf33
        del buf33
        triton_poi_fused__to_copy__unsafe_index_add_arange_clamp_floor_mul_rsub_sub_1[
            grid(4096)](buf32, buf37, buf13, buf18, 4096, XBLOCK=128,
            num_warps=4, num_stages=1)
        del buf13
        del buf18
        buf38 = empty_strided_cuda((4, 4, 32, 32), (4096, 1024, 32, 1),
            torch.float32)
        buf42 = buf38
        del buf38
        buf51 = buf42
        del buf42
        buf52 = empty_strided_cuda((4, 4, 32, 32), (4096, 1024, 32, 1),
            torch.float32)
        buf56 = buf52
        del buf52
        triton_poi_fused__to_copy__unsafe_index_add_arange_clamp_floor_mul_rsub_sub_2[
            grid(16384)](buf51, buf56, buf32, buf37, 16384, XBLOCK=128,
            num_warps=4, num_stages=1)
        del buf32
        del buf37
        buf57 = empty_strided_cuda((4, 4, 64, 64), (16384, 4096, 64, 1),
            torch.float32)
        buf61 = buf57
        del buf57
        buf70 = buf61
        del buf61
        buf76 = buf70
        del buf70
        triton_poi_fused__to_copy__unsafe_index_add_arange_clamp_floor_mul_rsub_sub_3[
            grid(65536)](buf76, buf51, buf56, 65536, XBLOCK=256, num_warps=
            4, num_stages=1)
        del buf51
        del buf56
    return buf76,


class UpsampleNew(nn.Module):

    def __init__(self, n_iter):
        super(UpsampleNew, self).__init__()
        self.n_iter = n_iter

    def forward(self, input_0):
        arg0_1 = input_0
        output = call([arg0_1])
        return output[0]


Measured latency_ms: 0.013906