# AOT ID: ['0_forward']
from ctypes import c_void_p, c_long, c_int
import torch
import math
import random
import os
import tempfile
from math import inf, nan
from torch._inductor.hooks import run_intermediate_hooks
from torch._inductor.utils import maybe_profile
from torch._inductor.codegen.memory_planning import _align as align
from torch import device, empty_strided
from torch._inductor.async_compile import AsyncCompile
from torch._inductor.select_algorithm import extern_kernels
from torch._inductor.codegen.multi_kernel import MultiKernelCall
import triton
import triton.language as tl
from torch._inductor.runtime.triton_heuristics import grid, split_scan_grid, grid_combo_kernels, start_graph, end_graph
from torch._C import _cuda_getCurrentRawStream as get_raw_stream

aten = torch.ops.aten
inductor_ops = torch.ops.inductor
_quantized = torch.ops._quantized
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cpu = torch._C._dynamo.guards._empty_strided_cpu
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda
empty_strided_xpu = torch._C._dynamo.guards._empty_strided_xpu
reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor
alloc_from_pool = torch.ops.inductor._alloc_from_pool
async_compile = AsyncCompile()


# kernel path: runs/run_shard_7/inductor_cache/qn/cqnti5iitvrxrh7dyowywnmvtlauntp4d23ys2ikifaltznsxltz.py
# Topologically Sorted Source Nodes: [sub], Original ATen: [aten.rsub]
# Source node to ATen node mapping:
#   sub => sub
# Graph fragment:
#   %sub : [num_users=2] = call_function[target=torch.ops.aten.sub.Tensor](args = (1, %primals_1), kwargs = {})
triton_poi_fused_rsub_0 = async_compile.triton('triton_poi_fused_rsub_0', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

from torch._inductor.runtime import triton_helpers, triton_heuristics
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, instance_descriptor, DeviceProperties

@triton_heuristics.pointwise(
    size_hints=[65536], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_rsub_0', 'mutated_arg_names': [], 'no_x_dim': False, 'num_load': 1, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_rsub_0(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 65536
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (x0), None)
    tmp1 = 1.0
    tmp2 = tmp1 - tmp0
    tl.store(out_ptr0 + (x0), tmp2, None)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/3q/c3qnuoev6dwx2zxchad7ud6v745dbs32cndfizw3mngimkvw3pij.py
# Topologically Sorted Source Nodes: [layer_1], Original ATen: [aten.leaky_relu]
# Source node to ATen node mapping:
#   layer_1 => gt, mul, where
# Graph fragment:
#   %gt : [num_users=1] = call_function[target=torch.ops.aten.gt.Scalar](args = (%convolution, 0), kwargs = {})
#   %mul : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%convolution, 0.01), kwargs = {})
#   %where : [num_users=3] = call_function[target=torch.ops.aten.where.self](args = (%gt, %convolution, %mul), kwargs = {})
triton_poi_fused_leaky_relu_1 = async_compile.triton('triton_poi_fused_leaky_relu_1', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

from torch._inductor.runtime import triton_helpers, triton_heuristics
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, instance_descriptor, DeviceProperties

@triton_heuristics.pointwise(
    size_hints=[65536], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_leaky_relu_1', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': False, 'num_load': 1, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_leaky_relu_1(in_out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 65536
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x0 = xindex
    tmp0 = tl.load(in_out_ptr0 + (x0), None)
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 0.01
    tmp4 = tmp0 * tmp3
    tmp5 = tl.where(tmp2, tmp0, tmp4)
    tl.store(in_out_ptr0 + (x0), tmp5, None)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/26/c26x4yv35twxzhj5x7dppsptgvglkcbiud7qbbbluhshkae7kjjy.py
# Topologically Sorted Source Nodes: [output_3, output_4], Original ATen: [aten.add, aten.leaky_relu]
# Source node to ATen node mapping:
#   output_3 => add
#   output_4 => gt_2, mul_2, where_2
# Graph fragment:
#   %add : [num_users=3] = call_function[target=torch.ops.aten.add.Tensor](args = (%convolution_2, %where), kwargs = {})
#   %gt_2 : [num_users=1] = call_function[target=torch.ops.aten.gt.Scalar](args = (%add, 0), kwargs = {})
#   %mul_2 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%add, 0.01), kwargs = {})
#   %where_2 : [num_users=3] = call_function[target=torch.ops.aten.where.self](args = (%gt_2, %add, %mul_2), kwargs = {})
triton_poi_fused_add_leaky_relu_2 = async_compile.triton('triton_poi_fused_add_leaky_relu_2', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

from torch._inductor.runtime import triton_helpers, triton_heuristics
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, instance_descriptor, DeviceProperties

@triton_heuristics.pointwise(
    size_hints=[65536], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_leaky_relu_2', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': False, 'num_load': 2, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_add_leaky_relu_2(in_out_ptr0, in_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 65536
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x0 = xindex
    tmp0 = tl.load(in_out_ptr0 + (x0), None)
    tmp1 = tl.load(in_ptr0 + (x0), None)
    tmp2 = tmp0 + tmp1
    tmp3 = 0.0
    tmp4 = tmp2 > tmp3
    tmp5 = 0.01
    tmp6 = tmp2 * tmp5
    tmp7 = tl.where(tmp4, tmp2, tmp6)
    tl.store(in_out_ptr0 + (x0), tmp7, None)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/4r/c4riygppzes7b34e5e5roaq333sjmfmf3x3ypvaa72wunibt7nph.py
# Topologically Sorted Source Nodes: [output_11], Original ATen: [aten.leaky_relu]
# Source node to ATen node mapping:
#   output_11 => gt_5, mul_5, where_5
# Graph fragment:
#   %gt_5 : [num_users=1] = call_function[target=torch.ops.aten.gt.Scalar](args = (%convolution_5, 0), kwargs = {})
#   %mul_5 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%convolution_5, 0.01), kwargs = {})
#   %where_5 : [num_users=2] = call_function[target=torch.ops.aten.where.self](args = (%gt_5, %convolution_5, %mul_5), kwargs = {})
triton_poi_fused_leaky_relu_3 = async_compile.triton('triton_poi_fused_leaky_relu_3', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

from torch._inductor.runtime import triton_helpers, triton_heuristics
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, instance_descriptor, DeviceProperties

@triton_heuristics.pointwise(
    size_hints=[32768], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_leaky_relu_3', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': False, 'num_load': 1, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_leaky_relu_3(in_out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 32768
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x0 = xindex
    tmp0 = tl.load(in_out_ptr0 + (x0), None)
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 0.01
    tmp4 = tmp0 * tmp3
    tmp5 = tl.where(tmp2, tmp0, tmp4)
    tl.store(in_out_ptr0 + (x0), tmp5, None)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/tq/ctqahnhp7yadilwznlpoju3po4gsyqzregmrg3uw4kkgd3w7o3e2.py
# Topologically Sorted Source Nodes: [output_13, output_14], Original ATen: [aten.add, aten.leaky_relu]
# Source node to ATen node mapping:
#   output_13 => add_2
#   output_14 => gt_6, mul_6, where_6
# Graph fragment:
#   %add_2 : [num_users=3] = call_function[target=torch.ops.aten.add.Tensor](args = (%convolution_6, %convolution_7), kwargs = {})
#   %gt_6 : [num_users=1] = call_function[target=torch.ops.aten.gt.Scalar](args = (%add_2, 0), kwargs = {})
#   %mul_6 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%add_2, 0.01), kwargs = {})
#   %where_6 : [num_users=3] = call_function[target=torch.ops.aten.where.self](args = (%gt_6, %add_2, %mul_6), kwargs = {})
triton_poi_fused_add_leaky_relu_4 = async_compile.triton('triton_poi_fused_add_leaky_relu_4', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

from torch._inductor.runtime import triton_helpers, triton_heuristics
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, instance_descriptor, DeviceProperties

@triton_heuristics.pointwise(
    size_hints=[32768], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_leaky_relu_4', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': False, 'num_load': 2, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_add_leaky_relu_4(in_out_ptr0, in_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 32768
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x0 = xindex
    tmp0 = tl.load(in_out_ptr0 + (x0), None)
    tmp1 = tl.load(in_ptr0 + (x0), None)
    tmp2 = tmp0 + tmp1
    tmp3 = 0.0
    tmp4 = tmp2 > tmp3
    tmp5 = 0.01
    tmp6 = tmp2 * tmp5
    tmp7 = tl.where(tmp4, tmp2, tmp6)
    tl.store(in_out_ptr0 + (x0), tmp7, None)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/zj/czjhnwnjko7zlcof7tikjpii7h6kwkwgknixnv73xem5ntw2xjes.py
# Topologically Sorted Source Nodes: [output_21], Original ATen: [aten.leaky_relu]
# Source node to ATen node mapping:
#   output_21 => gt_9, mul_9, where_9
# Graph fragment:
#   %gt_9 : [num_users=1] = call_function[target=torch.ops.aten.gt.Scalar](args = (%convolution_10, 0), kwargs = {})
#   %mul_9 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%convolution_10, 0.01), kwargs = {})
#   %where_9 : [num_users=2] = call_function[target=torch.ops.aten.where.self](args = (%gt_9, %convolution_10, %mul_9), kwargs = {})
triton_poi_fused_leaky_relu_5 = async_compile.triton('triton_poi_fused_leaky_relu_5', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

from torch._inductor.runtime import triton_helpers, triton_heuristics
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, instance_descriptor, DeviceProperties

@triton_heuristics.pointwise(
    size_hints=[16384], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_leaky_relu_5', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': False, 'num_load': 1, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_leaky_relu_5(in_out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 16384
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x0 = xindex
    tmp0 = tl.load(in_out_ptr0 + (x0), None)
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 0.01
    tmp4 = tmp0 * tmp3
    tmp5 = tl.where(tmp2, tmp0, tmp4)
    tl.store(in_out_ptr0 + (x0), tmp5, None)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/m4/cm4dhe5l4vzhizx2f5q63smyixx54qcmiidv6vem53zuokzgocfc.py
# Topologically Sorted Source Nodes: [output_23, output_24], Original ATen: [aten.add, aten.leaky_relu]
# Source node to ATen node mapping:
#   output_23 => add_4
#   output_24 => gt_10, mul_10, where_10
# Graph fragment:
#   %add_4 : [num_users=3] = call_function[target=torch.ops.aten.add.Tensor](args = (%convolution_11, %convolution_12), kwargs = {})
#   %gt_10 : [num_users=1] = call_function[target=torch.ops.aten.gt.Scalar](args = (%add_4, 0), kwargs = {})
#   %mul_10 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%add_4, 0.01), kwargs = {})
#   %where_10 : [num_users=3] = call_function[target=torch.ops.aten.where.self](args = (%gt_10, %add_4, %mul_10), kwargs = {})
triton_poi_fused_add_leaky_relu_6 = async_compile.triton('triton_poi_fused_add_leaky_relu_6', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

from torch._inductor.runtime import triton_helpers, triton_heuristics
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, instance_descriptor, DeviceProperties

@triton_heuristics.pointwise(
    size_hints=[16384], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_leaky_relu_6', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': False, 'num_load': 2, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_add_leaky_relu_6(in_out_ptr0, in_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 16384
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x0 = xindex
    tmp0 = tl.load(in_out_ptr0 + (x0), None)
    tmp1 = tl.load(in_ptr0 + (x0), None)
    tmp2 = tmp0 + tmp1
    tmp3 = 0.0
    tmp4 = tmp2 > tmp3
    tmp5 = 0.01
    tmp6 = tmp2 * tmp5
    tmp7 = tl.where(tmp4, tmp2, tmp6)
    tl.store(in_out_ptr0 + (x0), tmp7, None)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/vy/cvym6rwsw2e7qwcraou2o3c42ceqsfibvz272fdejko5v55bhsu7.py
# Topologically Sorted Source Nodes: [output_31], Original ATen: [aten.leaky_relu]
# Source node to ATen node mapping:
#   output_31 => gt_13, mul_13, where_13
# Graph fragment:
#   %gt_13 : [num_users=1] = call_function[target=torch.ops.aten.gt.Scalar](args = (%convolution_15, 0), kwargs = {})
#   %mul_13 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%convolution_15, 0.01), kwargs = {})
#   %where_13 : [num_users=2] = call_function[target=torch.ops.aten.where.self](args = (%gt_13, %convolution_15, %mul_13), kwargs = {})
triton_poi_fused_leaky_relu_7 = async_compile.triton('triton_poi_fused_leaky_relu_7', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

from torch._inductor.runtime import triton_helpers, triton_heuristics
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, instance_descriptor, DeviceProperties

@triton_heuristics.pointwise(
    size_hints=[8192], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_leaky_relu_7', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': False, 'num_load': 1, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_leaky_relu_7(in_out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 8192
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x0 = xindex
    tmp0 = tl.load(in_out_ptr0 + (x0), None)
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 0.01
    tmp4 = tmp0 * tmp3
    tmp5 = tl.where(tmp2, tmp0, tmp4)
    tl.store(in_out_ptr0 + (x0), tmp5, None)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/zd/czd34wzls7xlthbx53z3gm2pxvau4ty5xfsdpuryqltkzmnbh2rd.py
# Topologically Sorted Source Nodes: [output_33, output_34], Original ATen: [aten.add, aten.leaky_relu]
# Source node to ATen node mapping:
#   output_33 => add_6
#   output_34 => gt_14, mul_14, where_14
# Graph fragment:
#   %add_6 : [num_users=3] = call_function[target=torch.ops.aten.add.Tensor](args = (%convolution_16, %convolution_17), kwargs = {})
#   %gt_14 : [num_users=1] = call_function[target=torch.ops.aten.gt.Scalar](args = (%add_6, 0), kwargs = {})
#   %mul_14 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%add_6, 0.01), kwargs = {})
#   %where_14 : [num_users=3] = call_function[target=torch.ops.aten.where.self](args = (%gt_14, %add_6, %mul_14), kwargs = {})
triton_poi_fused_add_leaky_relu_8 = async_compile.triton('triton_poi_fused_add_leaky_relu_8', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

from torch._inductor.runtime import triton_helpers, triton_heuristics
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, instance_descriptor, DeviceProperties

@triton_heuristics.pointwise(
    size_hints=[8192], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_leaky_relu_8', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': False, 'num_load': 2, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_add_leaky_relu_8(in_out_ptr0, in_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 8192
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x0 = xindex
    tmp0 = tl.load(in_out_ptr0 + (x0), None)
    tmp1 = tl.load(in_ptr0 + (x0), None)
    tmp2 = tmp0 + tmp1
    tmp3 = 0.0
    tmp4 = tmp2 > tmp3
    tmp5 = 0.01
    tmp6 = tmp2 * tmp5
    tmp7 = tl.where(tmp4, tmp2, tmp6)
    tl.store(in_out_ptr0 + (x0), tmp7, None)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/rc/crcpnjkkixnrtizd5crw5p6lsh3qinuynqxbbwh3yriukwo6f5tq.py
# Topologically Sorted Source Nodes: [layer_9, layer_10], Original ATen: [aten.convolution, aten.leaky_relu]
# Source node to ATen node mapping:
#   layer_10 => gt_17, mul_17, where_17
#   layer_9 => convolution_20
# Graph fragment:
#   %convolution_20 : [num_users=3] = call_function[target=torch.ops.aten.convolution.default](args = (%where_16, %primals_22, %primals_23, [2, 2], [1, 1], [1, 1], False, [0, 0], 1), kwargs = {})
#   %gt_17 : [num_users=1] = call_function[target=torch.ops.aten.gt.Scalar](args = (%convolution_20, 0), kwargs = {})
#   %mul_17 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%convolution_20, 0.01), kwargs = {})
#   %where_17 : [num_users=2] = call_function[target=torch.ops.aten.where.self](args = (%gt_17, %convolution_20, %mul_17), kwargs = {})
triton_poi_fused_convolution_leaky_relu_9 = async_compile.triton('triton_poi_fused_convolution_leaky_relu_9', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

from torch._inductor.runtime import triton_helpers, triton_heuristics
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, instance_descriptor, DeviceProperties

@triton_heuristics.pointwise(
    size_hints=[4096], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_convolution_leaky_relu_9', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': False, 'num_load': 2, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_convolution_leaky_relu_9(in_out_ptr0, in_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 4096
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = tl.full([XBLOCK], True, tl.int1)
    x3 = xindex
    x1 = (xindex // 16) % 64
    tmp0 = tl.load(in_out_ptr0 + (x3), None)
    tmp1 = tl.load(in_ptr0 + (x1), None, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = 0.0
    tmp4 = tmp2 > tmp3
    tmp5 = 0.01
    tmp6 = tmp2 * tmp5
    tmp7 = tl.where(tmp4, tmp2, tmp6)
    tl.store(in_out_ptr0 + (x3), tmp7, None)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/an/canonpr3do7s7woj45srhmo3vfgizj3foioohk2o36spcfikbb6n.py
# Topologically Sorted Source Nodes: [layer_13], Original ATen: [aten.leaky_relu]
# Source node to ATen node mapping:
#   layer_13 => gt_18, mul_18, where_18
# Graph fragment:
#   %gt_18 : [num_users=1] = call_function[target=torch.ops.aten.gt.Scalar](args = (%view, 0), kwargs = {})
#   %mul_18 : [num_users=1] = call_function[target=torch.ops.aten.mul.Tensor](args = (%view, 0.01), kwargs = {})
#   %where_18 : [num_users=1] = call_function[target=torch.ops.aten.where.self](args = (%gt_18, %view, %mul_18), kwargs = {})
triton_poi_fused_leaky_relu_10 = async_compile.triton('triton_poi_fused_leaky_relu_10', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

from torch._inductor.runtime import triton_helpers, triton_heuristics
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, instance_descriptor, DeviceProperties

@triton_heuristics.pointwise(
    size_hints=[256], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_leaky_relu_10', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': False, 'num_load': 2, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_leaky_relu_10(in_out_ptr0, in_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 256
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x2 = xindex
    x0 = xindex % 64
    tmp0 = tl.load(in_out_ptr0 + (x2), xmask)
    tmp1 = tl.load(in_ptr0 + (x0), xmask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = 0.0
    tmp4 = tmp2 > tmp3
    tmp5 = 0.01
    tmp6 = tmp2 * tmp5
    tmp7 = tl.where(tmp4, tmp2, tmp6)
    tl.store(in_out_ptr0 + (x2), tmp7, xmask)
''', device_str='cuda')


# kernel path: runs/run_shard_7/inductor_cache/zi/czijvb7zczq3uyde6lfqyxaulguaj3yawdmbhknhxk65meyppdti.py
# Topologically Sorted Source Nodes: [l4_1], Original ATen: [aten.sigmoid]
# Source node to ATen node mapping:
#   l4_1 => sigmoid
# Graph fragment:
#   %add_tensor : [num_users=1] = call_function[target=torch.ops.aten.add.Tensor](args = (%mm_default, %primals_33), kwargs = {})
#   %sigmoid : [num_users=1] = call_function[target=torch.ops.aten.sigmoid.default](args = (%add_tensor,), kwargs = {})
triton_poi_fused_sigmoid_11 = async_compile.triton('triton_poi_fused_sigmoid_11', '''
import triton
import triton.language as tl
from triton.compiler.compiler import AttrsDescriptor

from torch._inductor.runtime import triton_helpers, triton_heuristics
from torch._inductor.runtime.triton_helpers import libdevice, math as tl_math
from torch._inductor.runtime.hints import AutotuneHint, ReductionHint, TileHint, instance_descriptor, DeviceProperties

@triton_heuristics.pointwise(
    size_hints=[16], 
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: 'i32'}, 'device': DeviceProperties(type='cuda', index=0, cc=80, major=8, regs_per_multiprocessor=65536, max_threads_per_multi_processor=2048, multi_processor_count=108), 'constants': {}, 'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2), equal_to_1=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_sigmoid_11', 'mutated_arg_names': ['in_out_ptr0'], 'no_x_dim': False, 'num_load': 2, 'num_reduction': 0, 'backend_hash': 'A9C866B4A14FD3277824029365D703C2427B2E685E54EC9B3EF4ADC8D1EEAC1D', 'are_deterministic_algorithms_enabled': False, 'assert_indirect_indexing': True, 'autotune_local_cache': True, 'autotune_pointwise': True, 'autotune_remote_cache': None, 'force_disable_caches': False, 'dynamic_scale_rblock': True, 'max_autotune': False, 'max_autotune_pointwise': False, 'min_split_scan_rblock': 256, 'spill_threshold': 16, 'store_cubin': False},
    min_elem_per_thread=0
)
@triton.jit
def triton_poi_fused_sigmoid_11(in_out_ptr0, in_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 16
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x2 = xindex
    x0 = xindex % 4
    tmp0 = tl.load(in_out_ptr0 + (x2), xmask)
    tmp1 = tl.load(in_ptr0 + (x0), xmask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = tl.sigmoid(tmp2)
    tl.store(in_out_ptr0 + (x2), tmp3, xmask)
''', device_str='cuda')


async_compile.wait(globals())
del async_compile

def call(args):
    primals_1, primals_2, primals_3, primals_4, primals_5, primals_6, primals_7, primals_8, primals_9, primals_10, primals_11, primals_12, primals_13, primals_14, primals_15, primals_16, primals_17, primals_18, primals_19, primals_20, primals_21, primals_22, primals_23, primals_24, primals_25, primals_26, primals_27, primals_28, primals_29, primals_30, primals_31, primals_32, primals_33 = args
    args.clear()
    assert_size_stride(primals_1, (4, 1, 128, 128), (16384, 16384, 128, 1))
    assert_size_stride(primals_2, (4, 1, 7, 7), (49, 49, 7, 1))
    assert_size_stride(primals_3, (4, 4, 3, 3), (36, 9, 3, 1))
    assert_size_stride(primals_4, (4, 4, 3, 3), (36, 9, 3, 1))
    assert_size_stride(primals_5, (4, 4, 3, 3), (36, 9, 3, 1))
    assert_size_stride(primals_6, (4, 4, 3, 3), (36, 9, 3, 1))
    assert_size_stride(primals_7, (8, 4, 3, 3), (36, 9, 3, 1))
    assert_size_stride(primals_8, (8, 8, 3, 3), (72, 9, 3, 1))
    assert_size_stride(primals_9, (8, 4, 1, 1), (4, 1, 1, 1))
    assert_size_stride(primals_10, (8, 8, 3, 3), (72, 9, 3, 1))
    assert_size_stride(primals_11, (8, 8, 3, 3), (72, 9, 3, 1))
    assert_size_stride(primals_12, (16, 8, 3, 3), (72, 9, 3, 1))
    assert_size_stride(primals_13, (16, 16, 3, 3), (144, 9, 3, 1))
    assert_size_stride(primals_14, (16, 8, 1, 1), (8, 1, 1, 1))
    assert_size_stride(primals_15, (16, 16, 3, 3), (144, 9, 3, 1))
    assert_size_stride(primals_16, (16, 16, 3, 3), (144, 9, 3, 1))
    assert_size_stride(primals_17, (32, 16, 3, 3), (144, 9, 3, 1))
    assert_size_stride(primals_18, (32, 32, 3, 3), (288, 9, 3, 1))
    assert_size_stride(primals_19, (32, 16, 1, 1), (16, 1, 1, 1))
    assert_size_stride(primals_20, (32, 32, 3, 3), (288, 9, 3, 1))
    assert_size_stride(primals_21, (32, 32, 3, 3), (288, 9, 3, 1))
    assert_size_stride(primals_22, (64, 32, 4, 4), (512, 16, 4, 1))
    assert_size_stride(primals_23, (64, ), (1, ))
    assert_size_stride(primals_24, (64, 64, 4, 4), (1024, 16, 4, 1))
    assert_size_stride(primals_25, (64, ), (1, ))
    assert_size_stride(primals_26, (64, 64), (64, 1))
    assert_size_stride(primals_27, (64, ), (1, ))
    assert_size_stride(primals_28, (64, 64), (64, 1))
    assert_size_stride(primals_29, (64, ), (1, ))
    assert_size_stride(primals_30, (64, 64), (64, 1))
    assert_size_stride(primals_31, (64, ), (1, ))
    assert_size_stride(primals_32, (4, 64), (64, 1))
    assert_size_stride(primals_33, (4, ), (1, ))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = empty_strided_cuda((4, 1, 128, 128), (16384, 16384, 128, 1), torch.float32)
        # Topologically Sorted Source Nodes: [sub], Original ATen: [aten.rsub]
        stream0 = get_raw_stream(0)
        triton_poi_fused_rsub_0.run(primals_1, buf0, 65536, grid=grid(65536), stream=stream0)
        del primals_1
        # Topologically Sorted Source Nodes: [layer_0], Original ATen: [aten.convolution]
        buf1 = extern_kernels.convolution(buf0, primals_2, stride=(2, 2), padding=(3, 3), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf1, (4, 4, 64, 64), (16384, 4096, 64, 1))
        buf2 = buf1; del buf1  # reuse
        # Topologically Sorted Source Nodes: [layer_1], Original ATen: [aten.leaky_relu]
        triton_poi_fused_leaky_relu_1.run(buf2, 65536, grid=grid(65536), stream=stream0)
        # Topologically Sorted Source Nodes: [output], Original ATen: [aten.convolution]
        buf3 = extern_kernels.convolution(buf2, primals_3, stride=(1, 1), padding=(1, 1), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf3, (4, 4, 64, 64), (16384, 4096, 64, 1))
        buf4 = buf3; del buf3  # reuse
        # Topologically Sorted Source Nodes: [output_1], Original ATen: [aten.leaky_relu]
        triton_poi_fused_leaky_relu_1.run(buf4, 65536, grid=grid(65536), stream=stream0)
        # Topologically Sorted Source Nodes: [output_2], Original ATen: [aten.convolution]
        buf5 = extern_kernels.convolution(buf4, primals_4, stride=(1, 1), padding=(1, 1), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf5, (4, 4, 64, 64), (16384, 4096, 64, 1))
        buf6 = buf5; del buf5  # reuse
        # Topologically Sorted Source Nodes: [output_3, output_4], Original ATen: [aten.add, aten.leaky_relu]
        triton_poi_fused_add_leaky_relu_2.run(buf6, buf2, 65536, grid=grid(65536), stream=stream0)
        # Topologically Sorted Source Nodes: [output_5], Original ATen: [aten.convolution]
        buf7 = extern_kernels.convolution(buf6, primals_5, stride=(1, 1), padding=(1, 1), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf7, (4, 4, 64, 64), (16384, 4096, 64, 1))
        buf8 = buf7; del buf7  # reuse
        # Topologically Sorted Source Nodes: [output_6], Original ATen: [aten.leaky_relu]
        triton_poi_fused_leaky_relu_1.run(buf8, 65536, grid=grid(65536), stream=stream0)
        # Topologically Sorted Source Nodes: [output_7], Original ATen: [aten.convolution]
        buf9 = extern_kernels.convolution(buf8, primals_6, stride=(1, 1), padding=(1, 1), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf9, (4, 4, 64, 64), (16384, 4096, 64, 1))
        buf10 = buf9; del buf9  # reuse
        # Topologically Sorted Source Nodes: [output_8, output_9], Original ATen: [aten.add, aten.leaky_relu]
        triton_poi_fused_add_leaky_relu_2.run(buf10, buf6, 65536, grid=grid(65536), stream=stream0)
        # Topologically Sorted Source Nodes: [output_10], Original ATen: [aten.convolution]
        buf11 = extern_kernels.convolution(buf10, primals_7, stride=(2, 2), padding=(1, 1), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf11, (4, 8, 32, 32), (8192, 1024, 32, 1))
        buf12 = buf11; del buf11  # reuse
        # Topologically Sorted Source Nodes: [output_11], Original ATen: [aten.leaky_relu]
        triton_poi_fused_leaky_relu_3.run(buf12, 32768, grid=grid(32768), stream=stream0)
        # Topologically Sorted Source Nodes: [output_12], Original ATen: [aten.convolution]
        buf13 = extern_kernels.convolution(buf12, primals_8, stride=(1, 1), padding=(1, 1), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf13, (4, 8, 32, 32), (8192, 1024, 32, 1))
        # Topologically Sorted Source Nodes: [input_], Original ATen: [aten.convolution]
        buf14 = extern_kernels.convolution(buf10, primals_9, stride=(2, 2), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf14, (4, 8, 32, 32), (8192, 1024, 32, 1))
        buf15 = buf13; del buf13  # reuse
        # Topologically Sorted Source Nodes: [output_13, output_14], Original ATen: [aten.add, aten.leaky_relu]
        triton_poi_fused_add_leaky_relu_4.run(buf15, buf14, 32768, grid=grid(32768), stream=stream0)
        del buf14
        # Topologically Sorted Source Nodes: [output_15], Original ATen: [aten.convolution]
        buf16 = extern_kernels.convolution(buf15, primals_10, stride=(1, 1), padding=(1, 1), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf16, (4, 8, 32, 32), (8192, 1024, 32, 1))
        buf17 = buf16; del buf16  # reuse
        # Topologically Sorted Source Nodes: [output_16], Original ATen: [aten.leaky_relu]
        triton_poi_fused_leaky_relu_3.run(buf17, 32768, grid=grid(32768), stream=stream0)
        # Topologically Sorted Source Nodes: [output_17], Original ATen: [aten.convolution]
        buf18 = extern_kernels.convolution(buf17, primals_11, stride=(1, 1), padding=(1, 1), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf18, (4, 8, 32, 32), (8192, 1024, 32, 1))
        buf19 = buf18; del buf18  # reuse
        # Topologically Sorted Source Nodes: [output_18, output_19], Original ATen: [aten.add, aten.leaky_relu]
        triton_poi_fused_add_leaky_relu_4.run(buf19, buf15, 32768, grid=grid(32768), stream=stream0)
        # Topologically Sorted Source Nodes: [output_20], Original ATen: [aten.convolution]
        buf20 = extern_kernels.convolution(buf19, primals_12, stride=(2, 2), padding=(1, 1), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf20, (4, 16, 16, 16), (4096, 256, 16, 1))
        buf21 = buf20; del buf20  # reuse
        # Topologically Sorted Source Nodes: [output_21], Original ATen: [aten.leaky_relu]
        triton_poi_fused_leaky_relu_5.run(buf21, 16384, grid=grid(16384), stream=stream0)
        # Topologically Sorted Source Nodes: [output_22], Original ATen: [aten.convolution]
        buf22 = extern_kernels.convolution(buf21, primals_13, stride=(1, 1), padding=(1, 1), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf22, (4, 16, 16, 16), (4096, 256, 16, 1))
        # Topologically Sorted Source Nodes: [input__1], Original ATen: [aten.convolution]
        buf23 = extern_kernels.convolution(buf19, primals_14, stride=(2, 2), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf23, (4, 16, 16, 16), (4096, 256, 16, 1))
        buf24 = buf22; del buf22  # reuse
        # Topologically Sorted Source Nodes: [output_23, output_24], Original ATen: [aten.add, aten.leaky_relu]
        triton_poi_fused_add_leaky_relu_6.run(buf24, buf23, 16384, grid=grid(16384), stream=stream0)
        del buf23
        # Topologically Sorted Source Nodes: [output_25], Original ATen: [aten.convolution]
        buf25 = extern_kernels.convolution(buf24, primals_15, stride=(1, 1), padding=(1, 1), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf25, (4, 16, 16, 16), (4096, 256, 16, 1))
        buf26 = buf25; del buf25  # reuse
        # Topologically Sorted Source Nodes: [output_26], Original ATen: [aten.leaky_relu]
        triton_poi_fused_leaky_relu_5.run(buf26, 16384, grid=grid(16384), stream=stream0)
        # Topologically Sorted Source Nodes: [output_27], Original ATen: [aten.convolution]
        buf27 = extern_kernels.convolution(buf26, primals_16, stride=(1, 1), padding=(1, 1), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf27, (4, 16, 16, 16), (4096, 256, 16, 1))
        buf28 = buf27; del buf27  # reuse
        # Topologically Sorted Source Nodes: [output_28, output_29], Original ATen: [aten.add, aten.leaky_relu]
        triton_poi_fused_add_leaky_relu_6.run(buf28, buf24, 16384, grid=grid(16384), stream=stream0)
        # Topologically Sorted Source Nodes: [output_30], Original ATen: [aten.convolution]
        buf29 = extern_kernels.convolution(buf28, primals_17, stride=(2, 2), padding=(1, 1), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf29, (4, 32, 8, 8), (2048, 64, 8, 1))
        buf30 = buf29; del buf29  # reuse
        # Topologically Sorted Source Nodes: [output_31], Original ATen: [aten.leaky_relu]
        triton_poi_fused_leaky_relu_7.run(buf30, 8192, grid=grid(8192), stream=stream0)
        # Topologically Sorted Source Nodes: [output_32], Original ATen: [aten.convolution]
        buf31 = extern_kernels.convolution(buf30, primals_18, stride=(1, 1), padding=(1, 1), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf31, (4, 32, 8, 8), (2048, 64, 8, 1))
        # Topologically Sorted Source Nodes: [input__2], Original ATen: [aten.convolution]
        buf32 = extern_kernels.convolution(buf28, primals_19, stride=(2, 2), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf32, (4, 32, 8, 8), (2048, 64, 8, 1))
        buf33 = buf31; del buf31  # reuse
        # Topologically Sorted Source Nodes: [output_33, output_34], Original ATen: [aten.add, aten.leaky_relu]
        triton_poi_fused_add_leaky_relu_8.run(buf33, buf32, 8192, grid=grid(8192), stream=stream0)
        del buf32
        # Topologically Sorted Source Nodes: [output_35], Original ATen: [aten.convolution]
        buf34 = extern_kernels.convolution(buf33, primals_20, stride=(1, 1), padding=(1, 1), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf34, (4, 32, 8, 8), (2048, 64, 8, 1))
        buf35 = buf34; del buf34  # reuse
        # Topologically Sorted Source Nodes: [output_36], Original ATen: [aten.leaky_relu]
        triton_poi_fused_leaky_relu_7.run(buf35, 8192, grid=grid(8192), stream=stream0)
        # Topologically Sorted Source Nodes: [output_37], Original ATen: [aten.convolution]
        buf36 = extern_kernels.convolution(buf35, primals_21, stride=(1, 1), padding=(1, 1), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf36, (4, 32, 8, 8), (2048, 64, 8, 1))
        buf37 = buf36; del buf36  # reuse
        # Topologically Sorted Source Nodes: [output_38, output_39], Original ATen: [aten.add, aten.leaky_relu]
        triton_poi_fused_add_leaky_relu_8.run(buf37, buf33, 8192, grid=grid(8192), stream=stream0)
        # Topologically Sorted Source Nodes: [layer_9], Original ATen: [aten.convolution]
        buf38 = extern_kernels.convolution(buf37, primals_22, stride=(2, 2), padding=(1, 1), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf38, (4, 64, 4, 4), (1024, 16, 4, 1))
        buf39 = buf38; del buf38  # reuse
        # Topologically Sorted Source Nodes: [layer_9, layer_10], Original ATen: [aten.convolution, aten.leaky_relu]
        triton_poi_fused_convolution_leaky_relu_9.run(buf39, primals_23, 4096, grid=grid(4096), stream=stream0)
        del primals_23
        # Topologically Sorted Source Nodes: [layer_11], Original ATen: [aten.convolution]
        buf40 = extern_kernels.convolution(buf39, primals_24, stride=(1, 1), padding=(0, 0), dilation=(1, 1), transposed=False, output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf40, (4, 64, 1, 1), (64, 1, 1, 1))
        buf41 = reinterpret_tensor(buf40, (4, 64), (64, 1), 0); del buf40  # reuse
        # Topologically Sorted Source Nodes: [layer_13], Original ATen: [aten.leaky_relu]
        triton_poi_fused_leaky_relu_10.run(buf41, primals_25, 256, grid=grid(256), stream=stream0)
        del primals_25
        buf42 = empty_strided_cuda((4, 64), (64, 1), torch.float32)
        # Topologically Sorted Source Nodes: [], Original ATen: []
        extern_kernels.mm(buf41, reinterpret_tensor(primals_26, (64, 64), (1, 64), 0), out=buf42)
        buf43 = buf42; del buf42  # reuse
        # Topologically Sorted Source Nodes: [l1_1], Original ATen: [aten.leaky_relu]
        triton_poi_fused_leaky_relu_10.run(buf43, primals_27, 256, grid=grid(256), stream=stream0)
        del primals_27
        buf44 = empty_strided_cuda((4, 64), (64, 1), torch.float32)
        # Topologically Sorted Source Nodes: [], Original ATen: []
        extern_kernels.mm(buf43, reinterpret_tensor(primals_28, (64, 64), (1, 64), 0), out=buf44)
        buf45 = buf44; del buf44  # reuse
        # Topologically Sorted Source Nodes: [l2_1], Original ATen: [aten.leaky_relu]
        triton_poi_fused_leaky_relu_10.run(buf45, primals_29, 256, grid=grid(256), stream=stream0)
        del primals_29
        buf46 = empty_strided_cuda((4, 64), (64, 1), torch.float32)
        # Topologically Sorted Source Nodes: [], Original ATen: []
        extern_kernels.mm(buf45, reinterpret_tensor(primals_30, (64, 64), (1, 64), 0), out=buf46)
        buf47 = buf46; del buf46  # reuse
        # Topologically Sorted Source Nodes: [l3_1], Original ATen: [aten.leaky_relu]
        triton_poi_fused_leaky_relu_10.run(buf47, primals_31, 256, grid=grid(256), stream=stream0)
        del primals_31
        buf48 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        # Topologically Sorted Source Nodes: [], Original ATen: []
        extern_kernels.mm(buf47, reinterpret_tensor(primals_32, (64, 4), (1, 64), 0), out=buf48)
        buf49 = buf48; del buf48  # reuse
        # Topologically Sorted Source Nodes: [l4_1], Original ATen: [aten.sigmoid]
        triton_poi_fused_sigmoid_11.run(buf49, primals_33, 16, grid=grid(16), stream=stream0)
        del primals_33
    return (buf49, primals_2, primals_3, primals_4, primals_5, primals_6, primals_7, primals_8, primals_9, primals_10, primals_11, primals_12, primals_13, primals_14, primals_15, primals_16, primals_17, primals_18, primals_19, primals_20, primals_21, primals_22, primals_24, buf0, buf2, buf4, buf6, buf8, buf10, buf12, buf15, buf17, buf19, buf21, buf24, buf26, buf28, buf30, buf33, buf35, buf37, buf39, buf41, buf43, buf45, buf47, buf49, primals_32, primals_30, primals_28, primals_26, )


def benchmark_compiled_module(times=10, repeat=10):
    from torch._dynamo.testing import rand_strided
    from torch._inductor.utils import print_performance
    primals_1 = rand_strided((4, 1, 128, 128), (16384, 16384, 128, 1), device='cuda:0', dtype=torch.float32)
    primals_2 = rand_strided((4, 1, 7, 7), (49, 49, 7, 1), device='cuda:0', dtype=torch.float32)
    primals_3 = rand_strided((4, 4, 3, 3), (36, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_4 = rand_strided((4, 4, 3, 3), (36, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_5 = rand_strided((4, 4, 3, 3), (36, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_6 = rand_strided((4, 4, 3, 3), (36, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_7 = rand_strided((8, 4, 3, 3), (36, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_8 = rand_strided((8, 8, 3, 3), (72, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_9 = rand_strided((8, 4, 1, 1), (4, 1, 1, 1), device='cuda:0', dtype=torch.float32)
    primals_10 = rand_strided((8, 8, 3, 3), (72, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_11 = rand_strided((8, 8, 3, 3), (72, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_12 = rand_strided((16, 8, 3, 3), (72, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_13 = rand_strided((16, 16, 3, 3), (144, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_14 = rand_strided((16, 8, 1, 1), (8, 1, 1, 1), device='cuda:0', dtype=torch.float32)
    primals_15 = rand_strided((16, 16, 3, 3), (144, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_16 = rand_strided((16, 16, 3, 3), (144, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_17 = rand_strided((32, 16, 3, 3), (144, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_18 = rand_strided((32, 32, 3, 3), (288, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_19 = rand_strided((32, 16, 1, 1), (16, 1, 1, 1), device='cuda:0', dtype=torch.float32)
    primals_20 = rand_strided((32, 32, 3, 3), (288, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_21 = rand_strided((32, 32, 3, 3), (288, 9, 3, 1), device='cuda:0', dtype=torch.float32)
    primals_22 = rand_strided((64, 32, 4, 4), (512, 16, 4, 1), device='cuda:0', dtype=torch.float32)
    primals_23 = rand_strided((64, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_24 = rand_strided((64, 64, 4, 4), (1024, 16, 4, 1), device='cuda:0', dtype=torch.float32)
    primals_25 = rand_strided((64, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_26 = rand_strided((64, 64), (64, 1), device='cuda:0', dtype=torch.float32)
    primals_27 = rand_strided((64, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_28 = rand_strided((64, 64), (64, 1), device='cuda:0', dtype=torch.float32)
    primals_29 = rand_strided((64, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_30 = rand_strided((64, 64), (64, 1), device='cuda:0', dtype=torch.float32)
    primals_31 = rand_strided((64, ), (1, ), device='cuda:0', dtype=torch.float32)
    primals_32 = rand_strided((4, 64), (64, 1), device='cuda:0', dtype=torch.float32)
    primals_33 = rand_strided((4, ), (1, ), device='cuda:0', dtype=torch.float32)
    fn = lambda: call([primals_1, primals_2, primals_3, primals_4, primals_5, primals_6, primals_7, primals_8, primals_9, primals_10, primals_11, primals_12, primals_13, primals_14, primals_15, primals_16, primals_17, primals_18, primals_19, primals_20, primals_21, primals_22, primals_23, primals_24, primals_25, primals_26, primals_27, primals_28, primals_29, primals_30, primals_31, primals_32, primals_33])
    return print_performance(fn, times=times, repeat=repeat)


if __name__ == "__main__":
    from torch._inductor.wrapper_benchmark import compiled_module_main
    compiled_module_main('None', benchmark_compiled_module)

import torch
import torch.nn as nn
import torch.nn.functional as F


class resnet_block(nn.Module):

    def __init__(self, dim_in, dim_out):
        super(resnet_block, self).__init__()
        self.dim_in = dim_in
        self.dim_out = dim_out
        if self.dim_in == self.dim_out:
            self.conv_1 = nn.Conv2d(self.dim_in, self.dim_out, 3, stride=1,
                padding=1, bias=False)
            self.conv_2 = nn.Conv2d(self.dim_out, self.dim_out, 3, stride=1,
                padding=1, bias=False)
            nn.init.xavier_uniform_(self.conv_1.weight)
            nn.init.xavier_uniform_(self.conv_2.weight)
        else:
            self.conv_1 = nn.Conv2d(self.dim_in, self.dim_out, 3, stride=2,
                padding=1, bias=False)
            self.conv_2 = nn.Conv2d(self.dim_out, self.dim_out, 3, stride=1,
                padding=1, bias=False)
            self.conv_s = nn.Conv2d(self.dim_in, self.dim_out, 1, stride=2,
                padding=0, bias=False)
            nn.init.xavier_uniform_(self.conv_1.weight)
            nn.init.xavier_uniform_(self.conv_2.weight)
            nn.init.xavier_uniform_(self.conv_s.weight)

    def forward(self, input, is_training=False):
        if self.dim_in == self.dim_out:
            output = self.conv_1(input)
            output = F.leaky_relu(output, negative_slope=0.01, inplace=True)
            output = self.conv_2(output)
            output = output + input
            output = F.leaky_relu(output, negative_slope=0.01, inplace=True)
        else:
            output = self.conv_1(input)
            output = F.leaky_relu(output, negative_slope=0.01, inplace=True)
            output = self.conv_2(output)
            input_ = self.conv_s(input)
            output = output + input_
            output = F.leaky_relu(output, negative_slope=0.01, inplace=True)
        return output


class img_encoder(nn.Module):

    def __init__(self, img_ef_dim, z_dim):
        super(img_encoder, self).__init__()
        self.img_ef_dim = img_ef_dim
        self.z_dim = z_dim
        self.conv_0 = nn.Conv2d(1, self.img_ef_dim, 7, stride=2, padding=3,
            bias=False)
        self.res_1 = resnet_block(self.img_ef_dim, self.img_ef_dim)
        self.res_2 = resnet_block(self.img_ef_dim, self.img_ef_dim)
        self.res_3 = resnet_block(self.img_ef_dim, self.img_ef_dim * 2)
        self.res_4 = resnet_block(self.img_ef_dim * 2, self.img_ef_dim * 2)
        self.res_5 = resnet_block(self.img_ef_dim * 2, self.img_ef_dim * 4)
        self.res_6 = resnet_block(self.img_ef_dim * 4, self.img_ef_dim * 4)
        self.res_7 = resnet_block(self.img_ef_dim * 4, self.img_ef_dim * 8)
        self.res_8 = resnet_block(self.img_ef_dim * 8, self.img_ef_dim * 8)
        self.conv_9 = nn.Conv2d(self.img_ef_dim * 8, self.img_ef_dim * 16, 
            4, stride=2, padding=1, bias=True)
        self.conv_10 = nn.Conv2d(self.img_ef_dim * 16, self.img_ef_dim * 16,
            4, stride=1, padding=0, bias=True)
        self.linear_1 = nn.Linear(self.img_ef_dim * 16, self.img_ef_dim * 
            16, bias=True)
        self.linear_2 = nn.Linear(self.img_ef_dim * 16, self.img_ef_dim * 
            16, bias=True)
        self.linear_3 = nn.Linear(self.img_ef_dim * 16, self.img_ef_dim * 
            16, bias=True)
        self.linear_4 = nn.Linear(self.img_ef_dim * 16, self.z_dim, bias=True)
        nn.init.xavier_uniform_(self.conv_0.weight)
        nn.init.xavier_uniform_(self.conv_9.weight)
        nn.init.constant_(self.conv_9.bias, 0)
        nn.init.xavier_uniform_(self.conv_10.weight)
        nn.init.constant_(self.conv_10.bias, 0)
        nn.init.xavier_uniform_(self.linear_1.weight)
        nn.init.constant_(self.linear_1.bias, 0)
        nn.init.xavier_uniform_(self.linear_2.weight)
        nn.init.constant_(self.linear_2.bias, 0)
        nn.init.xavier_uniform_(self.linear_3.weight)
        nn.init.constant_(self.linear_3.bias, 0)
        nn.init.xavier_uniform_(self.linear_4.weight)
        nn.init.constant_(self.linear_4.bias, 0)

    def forward(self, view, is_training=False):
        layer_0 = self.conv_0(1 - view)
        layer_0 = F.leaky_relu(layer_0, negative_slope=0.01, inplace=True)
        layer_1 = self.res_1(layer_0, is_training=is_training)
        layer_2 = self.res_2(layer_1, is_training=is_training)
        layer_3 = self.res_3(layer_2, is_training=is_training)
        layer_4 = self.res_4(layer_3, is_training=is_training)
        layer_5 = self.res_5(layer_4, is_training=is_training)
        layer_6 = self.res_6(layer_5, is_training=is_training)
        layer_7 = self.res_7(layer_6, is_training=is_training)
        layer_8 = self.res_8(layer_7, is_training=is_training)
        layer_9 = self.conv_9(layer_8)
        layer_9 = F.leaky_relu(layer_9, negative_slope=0.01, inplace=True)
        layer_10 = self.conv_10(layer_9)
        layer_10 = layer_10.view(-1, self.img_ef_dim * 16)
        layer_10 = F.leaky_relu(layer_10, negative_slope=0.01, inplace=True)
        l1 = self.linear_1(layer_10)
        l1 = F.leaky_relu(l1, negative_slope=0.01, inplace=True)
        l2 = self.linear_2(l1)
        l2 = F.leaky_relu(l2, negative_slope=0.01, inplace=True)
        l3 = self.linear_3(l2)
        l3 = F.leaky_relu(l3, negative_slope=0.01, inplace=True)
        l4 = self.linear_4(l3)
        l4 = torch.sigmoid(l4)
        return l4


def get_inputs():
    return [torch.rand([4, 1, 128, 128])]


def get_init_inputs():
    return [[], {'img_ef_dim': 4, 'z_dim': 4}]

import torch
from torch._inductor.select_algorithm import extern_kernels
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
import torch.nn as nn
import torch.nn.functional as F
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda
reinterpret_tensor = torch._C._dynamo.guards._reinterpret_tensor


@triton.jit
def triton_poi_fused_rsub_0(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + x0, None)
    tmp1 = 1.0
    tmp2 = tmp1 - tmp0
    tl.store(out_ptr0 + x0, tmp2, None)


@triton.jit
def triton_poi_fused_leaky_relu_1(in_out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x0 = xindex
    tmp0 = tl.load(in_out_ptr0 + x0, None)
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 0.01
    tmp4 = tmp0 * tmp3
    tmp5 = tl.where(tmp2, tmp0, tmp4)
    tl.store(in_out_ptr0 + x0, tmp5, None)


@triton.jit
def triton_poi_fused_add_leaky_relu_2(in_out_ptr0, in_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x0 = xindex
    tmp0 = tl.load(in_out_ptr0 + x0, None)
    tmp1 = tl.load(in_ptr0 + x0, None)
    tmp2 = tmp0 + tmp1
    tmp3 = 0.0
    tmp4 = tmp2 > tmp3
    tmp5 = 0.01
    tmp6 = tmp2 * tmp5
    tmp7 = tl.where(tmp4, tmp2, tmp6)
    tl.store(in_out_ptr0 + x0, tmp7, None)


@triton.jit
def triton_poi_fused_leaky_relu_3(in_out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x0 = xindex
    tmp0 = tl.load(in_out_ptr0 + x0, None)
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 0.01
    tmp4 = tmp0 * tmp3
    tmp5 = tl.where(tmp2, tmp0, tmp4)
    tl.store(in_out_ptr0 + x0, tmp5, None)


@triton.jit
def triton_poi_fused_add_leaky_relu_4(in_out_ptr0, in_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x0 = xindex
    tmp0 = tl.load(in_out_ptr0 + x0, None)
    tmp1 = tl.load(in_ptr0 + x0, None)
    tmp2 = tmp0 + tmp1
    tmp3 = 0.0
    tmp4 = tmp2 > tmp3
    tmp5 = 0.01
    tmp6 = tmp2 * tmp5
    tmp7 = tl.where(tmp4, tmp2, tmp6)
    tl.store(in_out_ptr0 + x0, tmp7, None)


@triton.jit
def triton_poi_fused_leaky_relu_5(in_out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x0 = xindex
    tmp0 = tl.load(in_out_ptr0 + x0, None)
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 0.01
    tmp4 = tmp0 * tmp3
    tmp5 = tl.where(tmp2, tmp0, tmp4)
    tl.store(in_out_ptr0 + x0, tmp5, None)


@triton.jit
def triton_poi_fused_add_leaky_relu_6(in_out_ptr0, in_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x0 = xindex
    tmp0 = tl.load(in_out_ptr0 + x0, None)
    tmp1 = tl.load(in_ptr0 + x0, None)
    tmp2 = tmp0 + tmp1
    tmp3 = 0.0
    tmp4 = tmp2 > tmp3
    tmp5 = 0.01
    tmp6 = tmp2 * tmp5
    tmp7 = tl.where(tmp4, tmp2, tmp6)
    tl.store(in_out_ptr0 + x0, tmp7, None)


@triton.jit
def triton_poi_fused_leaky_relu_7(in_out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x0 = xindex
    tmp0 = tl.load(in_out_ptr0 + x0, None)
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tmp3 = 0.01
    tmp4 = tmp0 * tmp3
    tmp5 = tl.where(tmp2, tmp0, tmp4)
    tl.store(in_out_ptr0 + x0, tmp5, None)


@triton.jit
def triton_poi_fused_add_leaky_relu_8(in_out_ptr0, in_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x0 = xindex
    tmp0 = tl.load(in_out_ptr0 + x0, None)
    tmp1 = tl.load(in_ptr0 + x0, None)
    tmp2 = tmp0 + tmp1
    tmp3 = 0.0
    tmp4 = tmp2 > tmp3
    tmp5 = 0.01
    tmp6 = tmp2 * tmp5
    tmp7 = tl.where(tmp4, tmp2, tmp6)
    tl.store(in_out_ptr0 + x0, tmp7, None)


@triton.jit
def triton_poi_fused_convolution_leaky_relu_9(in_out_ptr0, in_ptr0, xnumel,
    XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x3 = xindex
    x1 = xindex // 16 % 64
    tmp0 = tl.load(in_out_ptr0 + x3, None)
    tmp1 = tl.load(in_ptr0 + x1, None, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = 0.0
    tmp4 = tmp2 > tmp3
    tmp5 = 0.01
    tmp6 = tmp2 * tmp5
    tmp7 = tl.where(tmp4, tmp2, tmp6)
    tl.store(in_out_ptr0 + x3, tmp7, None)


@triton.jit
def triton_poi_fused_leaky_relu_10(in_out_ptr0, in_ptr0, xnumel, XBLOCK: tl
    .constexpr):
    xnumel = 256
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x2 = xindex
    x0 = xindex % 64
    tmp0 = tl.load(in_out_ptr0 + x2, xmask)
    tmp1 = tl.load(in_ptr0 + x0, xmask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = 0.0
    tmp4 = tmp2 > tmp3
    tmp5 = 0.01
    tmp6 = tmp2 * tmp5
    tmp7 = tl.where(tmp4, tmp2, tmp6)
    tl.store(in_out_ptr0 + x2, tmp7, xmask)


@triton.jit
def triton_poi_fused_sigmoid_11(in_out_ptr0, in_ptr0, xnumel, XBLOCK: tl.
    constexpr):
    xnumel = 16
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x2 = xindex
    x0 = xindex % 4
    tmp0 = tl.load(in_out_ptr0 + x2, xmask)
    tmp1 = tl.load(in_ptr0 + x0, xmask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = tl.sigmoid(tmp2)
    tl.store(in_out_ptr0 + x2, tmp3, xmask)


def call(args):
    (primals_1, primals_2, primals_3, primals_4, primals_5, primals_6,
        primals_7, primals_8, primals_9, primals_10, primals_11, primals_12,
        primals_13, primals_14, primals_15, primals_16, primals_17,
        primals_18, primals_19, primals_20, primals_21, primals_22,
        primals_23, primals_24, primals_25, primals_26, primals_27,
        primals_28, primals_29, primals_30, primals_31, primals_32, primals_33
        ) = args
    args.clear()
    assert_size_stride(primals_1, (4, 1, 128, 128), (16384, 16384, 128, 1))
    assert_size_stride(primals_2, (4, 1, 7, 7), (49, 49, 7, 1))
    assert_size_stride(primals_3, (4, 4, 3, 3), (36, 9, 3, 1))
    assert_size_stride(primals_4, (4, 4, 3, 3), (36, 9, 3, 1))
    assert_size_stride(primals_5, (4, 4, 3, 3), (36, 9, 3, 1))
    assert_size_stride(primals_6, (4, 4, 3, 3), (36, 9, 3, 1))
    assert_size_stride(primals_7, (8, 4, 3, 3), (36, 9, 3, 1))
    assert_size_stride(primals_8, (8, 8, 3, 3), (72, 9, 3, 1))
    assert_size_stride(primals_9, (8, 4, 1, 1), (4, 1, 1, 1))
    assert_size_stride(primals_10, (8, 8, 3, 3), (72, 9, 3, 1))
    assert_size_stride(primals_11, (8, 8, 3, 3), (72, 9, 3, 1))
    assert_size_stride(primals_12, (16, 8, 3, 3), (72, 9, 3, 1))
    assert_size_stride(primals_13, (16, 16, 3, 3), (144, 9, 3, 1))
    assert_size_stride(primals_14, (16, 8, 1, 1), (8, 1, 1, 1))
    assert_size_stride(primals_15, (16, 16, 3, 3), (144, 9, 3, 1))
    assert_size_stride(primals_16, (16, 16, 3, 3), (144, 9, 3, 1))
    assert_size_stride(primals_17, (32, 16, 3, 3), (144, 9, 3, 1))
    assert_size_stride(primals_18, (32, 32, 3, 3), (288, 9, 3, 1))
    assert_size_stride(primals_19, (32, 16, 1, 1), (16, 1, 1, 1))
    assert_size_stride(primals_20, (32, 32, 3, 3), (288, 9, 3, 1))
    assert_size_stride(primals_21, (32, 32, 3, 3), (288, 9, 3, 1))
    assert_size_stride(primals_22, (64, 32, 4, 4), (512, 16, 4, 1))
    assert_size_stride(primals_23, (64,), (1,))
    assert_size_stride(primals_24, (64, 64, 4, 4), (1024, 16, 4, 1))
    assert_size_stride(primals_25, (64,), (1,))
    assert_size_stride(primals_26, (64, 64), (64, 1))
    assert_size_stride(primals_27, (64,), (1,))
    assert_size_stride(primals_28, (64, 64), (64, 1))
    assert_size_stride(primals_29, (64,), (1,))
    assert_size_stride(primals_30, (64, 64), (64, 1))
    assert_size_stride(primals_31, (64,), (1,))
    assert_size_stride(primals_32, (4, 64), (64, 1))
    assert_size_stride(primals_33, (4,), (1,))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = empty_strided_cuda((4, 1, 128, 128), (16384, 16384, 128, 1),
            torch.float32)
        get_raw_stream(0)
        triton_poi_fused_rsub_0[grid(65536)](primals_1, buf0, 65536, XBLOCK
            =512, num_warps=4, num_stages=1)
        del primals_1
        buf1 = extern_kernels.convolution(buf0, primals_2, stride=(2, 2),
            padding=(3, 3), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf1, (4, 4, 64, 64), (16384, 4096, 64, 1))
        buf2 = buf1
        del buf1
        triton_poi_fused_leaky_relu_1[grid(65536)](buf2, 65536, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf3 = extern_kernels.convolution(buf2, primals_3, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf3, (4, 4, 64, 64), (16384, 4096, 64, 1))
        buf4 = buf3
        del buf3
        triton_poi_fused_leaky_relu_1[grid(65536)](buf4, 65536, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf5 = extern_kernels.convolution(buf4, primals_4, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf5, (4, 4, 64, 64), (16384, 4096, 64, 1))
        buf6 = buf5
        del buf5
        triton_poi_fused_add_leaky_relu_2[grid(65536)](buf6, buf2, 65536,
            XBLOCK=512, num_warps=4, num_stages=1)
        buf7 = extern_kernels.convolution(buf6, primals_5, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf7, (4, 4, 64, 64), (16384, 4096, 64, 1))
        buf8 = buf7
        del buf7
        triton_poi_fused_leaky_relu_1[grid(65536)](buf8, 65536, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf9 = extern_kernels.convolution(buf8, primals_6, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf9, (4, 4, 64, 64), (16384, 4096, 64, 1))
        buf10 = buf9
        del buf9
        triton_poi_fused_add_leaky_relu_2[grid(65536)](buf10, buf6, 65536,
            XBLOCK=512, num_warps=4, num_stages=1)
        buf11 = extern_kernels.convolution(buf10, primals_7, stride=(2, 2),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf11, (4, 8, 32, 32), (8192, 1024, 32, 1))
        buf12 = buf11
        del buf11
        triton_poi_fused_leaky_relu_3[grid(32768)](buf12, 32768, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf13 = extern_kernels.convolution(buf12, primals_8, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf13, (4, 8, 32, 32), (8192, 1024, 32, 1))
        buf14 = extern_kernels.convolution(buf10, primals_9, stride=(2, 2),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf14, (4, 8, 32, 32), (8192, 1024, 32, 1))
        buf15 = buf13
        del buf13
        triton_poi_fused_add_leaky_relu_4[grid(32768)](buf15, buf14, 32768,
            XBLOCK=256, num_warps=4, num_stages=1)
        del buf14
        buf16 = extern_kernels.convolution(buf15, primals_10, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf16, (4, 8, 32, 32), (8192, 1024, 32, 1))
        buf17 = buf16
        del buf16
        triton_poi_fused_leaky_relu_3[grid(32768)](buf17, 32768, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf18 = extern_kernels.convolution(buf17, primals_11, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf18, (4, 8, 32, 32), (8192, 1024, 32, 1))
        buf19 = buf18
        del buf18
        triton_poi_fused_add_leaky_relu_4[grid(32768)](buf19, buf15, 32768,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf20 = extern_kernels.convolution(buf19, primals_12, stride=(2, 2),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf20, (4, 16, 16, 16), (4096, 256, 16, 1))
        buf21 = buf20
        del buf20
        triton_poi_fused_leaky_relu_5[grid(16384)](buf21, 16384, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf22 = extern_kernels.convolution(buf21, primals_13, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf22, (4, 16, 16, 16), (4096, 256, 16, 1))
        buf23 = extern_kernels.convolution(buf19, primals_14, stride=(2, 2),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf23, (4, 16, 16, 16), (4096, 256, 16, 1))
        buf24 = buf22
        del buf22
        triton_poi_fused_add_leaky_relu_6[grid(16384)](buf24, buf23, 16384,
            XBLOCK=256, num_warps=4, num_stages=1)
        del buf23
        buf25 = extern_kernels.convolution(buf24, primals_15, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf25, (4, 16, 16, 16), (4096, 256, 16, 1))
        buf26 = buf25
        del buf25
        triton_poi_fused_leaky_relu_5[grid(16384)](buf26, 16384, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf27 = extern_kernels.convolution(buf26, primals_16, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf27, (4, 16, 16, 16), (4096, 256, 16, 1))
        buf28 = buf27
        del buf27
        triton_poi_fused_add_leaky_relu_6[grid(16384)](buf28, buf24, 16384,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf29 = extern_kernels.convolution(buf28, primals_17, stride=(2, 2),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf29, (4, 32, 8, 8), (2048, 64, 8, 1))
        buf30 = buf29
        del buf29
        triton_poi_fused_leaky_relu_7[grid(8192)](buf30, 8192, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf31 = extern_kernels.convolution(buf30, primals_18, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf31, (4, 32, 8, 8), (2048, 64, 8, 1))
        buf32 = extern_kernels.convolution(buf28, primals_19, stride=(2, 2),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf32, (4, 32, 8, 8), (2048, 64, 8, 1))
        buf33 = buf31
        del buf31
        triton_poi_fused_add_leaky_relu_8[grid(8192)](buf33, buf32, 8192,
            XBLOCK=256, num_warps=4, num_stages=1)
        del buf32
        buf34 = extern_kernels.convolution(buf33, primals_20, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf34, (4, 32, 8, 8), (2048, 64, 8, 1))
        buf35 = buf34
        del buf34
        triton_poi_fused_leaky_relu_7[grid(8192)](buf35, 8192, XBLOCK=256,
            num_warps=4, num_stages=1)
        buf36 = extern_kernels.convolution(buf35, primals_21, stride=(1, 1),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf36, (4, 32, 8, 8), (2048, 64, 8, 1))
        buf37 = buf36
        del buf36
        triton_poi_fused_add_leaky_relu_8[grid(8192)](buf37, buf33, 8192,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf38 = extern_kernels.convolution(buf37, primals_22, stride=(2, 2),
            padding=(1, 1), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf38, (4, 64, 4, 4), (1024, 16, 4, 1))
        buf39 = buf38
        del buf38
        triton_poi_fused_convolution_leaky_relu_9[grid(4096)](buf39,
            primals_23, 4096, XBLOCK=256, num_warps=4, num_stages=1)
        del primals_23
        buf40 = extern_kernels.convolution(buf39, primals_24, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf40, (4, 64, 1, 1), (64, 1, 1, 1))
        buf41 = reinterpret_tensor(buf40, (4, 64), (64, 1), 0)
        del buf40
        triton_poi_fused_leaky_relu_10[grid(256)](buf41, primals_25, 256,
            XBLOCK=128, num_warps=4, num_stages=1)
        del primals_25
        buf42 = empty_strided_cuda((4, 64), (64, 1), torch.float32)
        extern_kernels.mm(buf41, reinterpret_tensor(primals_26, (64, 64), (
            1, 64), 0), out=buf42)
        buf43 = buf42
        del buf42
        triton_poi_fused_leaky_relu_10[grid(256)](buf43, primals_27, 256,
            XBLOCK=128, num_warps=4, num_stages=1)
        del primals_27
        buf44 = empty_strided_cuda((4, 64), (64, 1), torch.float32)
        extern_kernels.mm(buf43, reinterpret_tensor(primals_28, (64, 64), (
            1, 64), 0), out=buf44)
        buf45 = buf44
        del buf44
        triton_poi_fused_leaky_relu_10[grid(256)](buf45, primals_29, 256,
            XBLOCK=128, num_warps=4, num_stages=1)
        del primals_29
        buf46 = empty_strided_cuda((4, 64), (64, 1), torch.float32)
        extern_kernels.mm(buf45, reinterpret_tensor(primals_30, (64, 64), (
            1, 64), 0), out=buf46)
        buf47 = buf46
        del buf46
        triton_poi_fused_leaky_relu_10[grid(256)](buf47, primals_31, 256,
            XBLOCK=128, num_warps=4, num_stages=1)
        del primals_31
        buf48 = empty_strided_cuda((4, 4), (4, 1), torch.float32)
        extern_kernels.mm(buf47, reinterpret_tensor(primals_32, (64, 4), (1,
            64), 0), out=buf48)
        buf49 = buf48
        del buf48
        triton_poi_fused_sigmoid_11[grid(16)](buf49, primals_33, 16, XBLOCK
            =16, num_warps=1, num_stages=1)
        del primals_33
    return (buf49, primals_2, primals_3, primals_4, primals_5, primals_6,
        primals_7, primals_8, primals_9, primals_10, primals_11, primals_12,
        primals_13, primals_14, primals_15, primals_16, primals_17,
        primals_18, primals_19, primals_20, primals_21, primals_22,
        primals_24, buf0, buf2, buf4, buf6, buf8, buf10, buf12, buf15,
        buf17, buf19, buf21, buf24, buf26, buf28, buf30, buf33, buf35,
        buf37, buf39, buf41, buf43, buf45, buf47, buf49, primals_32,
        primals_30, primals_28, primals_26)


class resnet_block(nn.Module):

    def __init__(self, dim_in, dim_out):
        super(resnet_block, self).__init__()
        self.dim_in = dim_in
        self.dim_out = dim_out
        if self.dim_in == self.dim_out:
            self.conv_1 = nn.Conv2d(self.dim_in, self.dim_out, 3, stride=1,
                padding=1, bias=False)
            self.conv_2 = nn.Conv2d(self.dim_out, self.dim_out, 3, stride=1,
                padding=1, bias=False)
            nn.init.xavier_uniform_(self.conv_1.weight)
            nn.init.xavier_uniform_(self.conv_2.weight)
        else:
            self.conv_1 = nn.Conv2d(self.dim_in, self.dim_out, 3, stride=2,
                padding=1, bias=False)
            self.conv_2 = nn.Conv2d(self.dim_out, self.dim_out, 3, stride=1,
                padding=1, bias=False)
            self.conv_s = nn.Conv2d(self.dim_in, self.dim_out, 1, stride=2,
                padding=0, bias=False)
            nn.init.xavier_uniform_(self.conv_1.weight)
            nn.init.xavier_uniform_(self.conv_2.weight)
            nn.init.xavier_uniform_(self.conv_s.weight)

    def forward(self, input, is_training=False):
        if self.dim_in == self.dim_out:
            output = self.conv_1(input)
            output = F.leaky_relu(output, negative_slope=0.01, inplace=True)
            output = self.conv_2(output)
            output = output + input
            output = F.leaky_relu(output, negative_slope=0.01, inplace=True)
        else:
            output = self.conv_1(input)
            output = F.leaky_relu(output, negative_slope=0.01, inplace=True)
            output = self.conv_2(output)
            input_ = self.conv_s(input)
            output = output + input_
            output = F.leaky_relu(output, negative_slope=0.01, inplace=True)
        return output


class img_encoderNew(nn.Module):

    def __init__(self, img_ef_dim, z_dim):
        super(img_encoderNew, self).__init__()
        self.img_ef_dim = img_ef_dim
        self.z_dim = z_dim
        self.conv_0 = nn.Conv2d(1, self.img_ef_dim, 7, stride=2, padding=3,
            bias=False)
        self.res_1 = resnet_block(self.img_ef_dim, self.img_ef_dim)
        self.res_2 = resnet_block(self.img_ef_dim, self.img_ef_dim)
        self.res_3 = resnet_block(self.img_ef_dim, self.img_ef_dim * 2)
        self.res_4 = resnet_block(self.img_ef_dim * 2, self.img_ef_dim * 2)
        self.res_5 = resnet_block(self.img_ef_dim * 2, self.img_ef_dim * 4)
        self.res_6 = resnet_block(self.img_ef_dim * 4, self.img_ef_dim * 4)
        self.res_7 = resnet_block(self.img_ef_dim * 4, self.img_ef_dim * 8)
        self.res_8 = resnet_block(self.img_ef_dim * 8, self.img_ef_dim * 8)
        self.conv_9 = nn.Conv2d(self.img_ef_dim * 8, self.img_ef_dim * 16, 
            4, stride=2, padding=1, bias=True)
        self.conv_10 = nn.Conv2d(self.img_ef_dim * 16, self.img_ef_dim * 16,
            4, stride=1, padding=0, bias=True)
        self.linear_1 = nn.Linear(self.img_ef_dim * 16, self.img_ef_dim * 
            16, bias=True)
        self.linear_2 = nn.Linear(self.img_ef_dim * 16, self.img_ef_dim * 
            16, bias=True)
        self.linear_3 = nn.Linear(self.img_ef_dim * 16, self.img_ef_dim * 
            16, bias=True)
        self.linear_4 = nn.Linear(self.img_ef_dim * 16, self.z_dim, bias=True)
        nn.init.xavier_uniform_(self.conv_0.weight)
        nn.init.xavier_uniform_(self.conv_9.weight)
        nn.init.constant_(self.conv_9.bias, 0)
        nn.init.xavier_uniform_(self.conv_10.weight)
        nn.init.constant_(self.conv_10.bias, 0)
        nn.init.xavier_uniform_(self.linear_1.weight)
        nn.init.constant_(self.linear_1.bias, 0)
        nn.init.xavier_uniform_(self.linear_2.weight)
        nn.init.constant_(self.linear_2.bias, 0)
        nn.init.xavier_uniform_(self.linear_3.weight)
        nn.init.constant_(self.linear_3.bias, 0)
        nn.init.xavier_uniform_(self.linear_4.weight)
        nn.init.constant_(self.linear_4.bias, 0)

    def forward(self, input_0):
        primals_2 = self.conv_0.weight
        primals_3 = self.res_1.conv_1.weight
        primals_4 = self.res_1.conv_2.weight
        primals_5 = self.res_2.conv_1.weight
        primals_6 = self.res_2.conv_2.weight
        primals_7 = self.res_3.conv_1.weight
        primals_8 = self.res_3.conv_2.weight
        primals_9 = self.res_3.conv_s.weight
        primals_10 = self.res_4.conv_1.weight
        primals_11 = self.res_4.conv_2.weight
        primals_12 = self.res_5.conv_1.weight
        primals_13 = self.res_5.conv_2.weight
        primals_14 = self.res_5.conv_s.weight
        primals_15 = self.res_6.conv_1.weight
        primals_16 = self.res_6.conv_2.weight
        primals_17 = self.res_7.conv_1.weight
        primals_18 = self.res_7.conv_2.weight
        primals_19 = self.res_7.conv_s.weight
        primals_20 = self.res_8.conv_1.weight
        primals_21 = self.res_8.conv_2.weight
        primals_22 = self.conv_9.weight
        primals_23 = self.conv_9.bias
        primals_24 = self.conv_10.weight
        primals_25 = self.conv_10.bias
        primals_26 = self.linear_1.weight
        primals_27 = self.linear_1.bias
        primals_28 = self.linear_2.weight
        primals_29 = self.linear_2.bias
        primals_30 = self.linear_3.weight
        primals_31 = self.linear_3.bias
        primals_32 = self.linear_4.weight
        primals_33 = self.linear_4.bias
        primals_1 = input_0
        output = call([primals_1, primals_2, primals_3, primals_4,
            primals_5, primals_6, primals_7, primals_8, primals_9,
            primals_10, primals_11, primals_12, primals_13, primals_14,
            primals_15, primals_16, primals_17, primals_18, primals_19,
            primals_20, primals_21, primals_22, primals_23, primals_24,
            primals_25, primals_26, primals_27, primals_28, primals_29,
            primals_30, primals_31, primals_32, primals_33])
        return output[0]
