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
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_convolution_0(in_ptr0, out_ptr0, ynumel, xnumel,
    YBLOCK: tl.constexpr, XBLOCK: tl.constexpr):
    ynumel = 16
    xnumel = 4
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex
    y0 = yindex % 4
    y1 = yindex // 4
    y3 = yindex
    tmp0 = tl.load(in_ptr0 + (y0 + 4 * x2 + 64 * y1), xmask & ymask,
        eviction_policy='evict_last')
    tl.store(out_ptr0 + (x2 + 4 * y3), tmp0, xmask & ymask)


@triton.jit
def triton_poi_fused_convolution_1(in_ptr0, out_ptr0, ynumel, xnumel,
    YBLOCK: tl.constexpr, XBLOCK: tl.constexpr):
    ynumel = 16
    xnumel = 4
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex
    y0 = yindex % 4
    y1 = yindex // 4
    y3 = yindex
    tmp0 = tl.load(in_ptr0 + (16 + y0 + 4 * x2 + 64 * y1), xmask & ymask,
        eviction_policy='evict_last')
    tl.store(out_ptr0 + (x2 + 4 * y3), tmp0, xmask & ymask)


@triton.jit
def triton_poi_fused_convolution_2(in_ptr0, out_ptr0, ynumel, xnumel,
    YBLOCK: tl.constexpr, XBLOCK: tl.constexpr):
    ynumel = 16
    xnumel = 4
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex
    y0 = yindex % 4
    y1 = yindex // 4
    y3 = yindex
    tmp0 = tl.load(in_ptr0 + (32 + y0 + 4 * x2 + 64 * y1), xmask & ymask,
        eviction_policy='evict_last')
    tl.store(out_ptr0 + (x2 + 4 * y3), tmp0, xmask & ymask)


@triton.jit
def triton_poi_fused_convolution_3(in_ptr0, out_ptr0, ynumel, xnumel,
    YBLOCK: tl.constexpr, XBLOCK: tl.constexpr):
    ynumel = 16
    xnumel = 4
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex
    y0 = yindex % 4
    y1 = yindex // 4
    y3 = yindex
    tmp0 = tl.load(in_ptr0 + (48 + y0 + 4 * x2 + 64 * y1), xmask & ymask,
        eviction_policy='evict_last')
    tl.store(out_ptr0 + (x2 + 4 * y3), tmp0, xmask & ymask)


@triton.jit
def triton_poi_fused_cat_leaky_relu_4(in_ptr0, in_ptr1, in_ptr2, in_ptr3,
    in_ptr4, out_ptr1, ynumel, xnumel, YBLOCK: tl.constexpr, XBLOCK: tl.
    constexpr):
    ynumel = 64
    xnumel = 4
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    y1 = yindex // 4 % 4
    x3 = xindex
    y0 = yindex % 4
    y2 = yindex // 16
    y4 = yindex // 4
    tmp0 = y1
    tl.full([1, 1], 0, tl.int64)
    tmp3 = tl.full([1, 1], 1, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + (x3 + 6 * y0 + 24 * y2), tmp4 & xmask & ymask,
        eviction_policy='evict_last', other=0.0)
    tmp6 = tl.load(in_ptr1 + tl.broadcast_to(y0, [XBLOCK, YBLOCK]), tmp4 &
        xmask & ymask, eviction_policy='evict_last', other=0.0)
    tmp7 = tmp5 + tmp6
    tmp8 = tl.full(tmp7.shape, 0.0, tmp7.dtype)
    tmp9 = tl.where(tmp4, tmp7, tmp8)
    tmp10 = tmp0 >= tmp3
    tmp11 = tl.full([1, 1], 2, tl.int64)
    tmp12 = tmp0 < tmp11
    tmp13 = tmp10 & tmp12
    tmp14 = tl.load(in_ptr2 + (x3 + 6 * y0 + 24 * y2), tmp13 & xmask &
        ymask, eviction_policy='evict_last', other=0.0)
    tmp15 = tl.load(in_ptr1 + tl.broadcast_to(y0, [XBLOCK, YBLOCK]), tmp13 &
        xmask & ymask, eviction_policy='evict_last', other=0.0)
    tmp16 = tmp14 + tmp15
    tmp17 = tl.full(tmp16.shape, 0.0, tmp16.dtype)
    tmp18 = tl.where(tmp13, tmp16, tmp17)
    tmp19 = tmp0 >= tmp11
    tmp20 = tl.full([1, 1], 3, tl.int64)
    tmp21 = tmp0 < tmp20
    tmp22 = tmp19 & tmp21
    tmp23 = tl.load(in_ptr3 + (x3 + 6 * y0 + 24 * y2), tmp22 & xmask &
        ymask, eviction_policy='evict_last', other=0.0)
    tmp24 = tl.load(in_ptr1 + tl.broadcast_to(y0, [XBLOCK, YBLOCK]), tmp22 &
        xmask & ymask, eviction_policy='evict_last', other=0.0)
    tmp25 = tmp23 + tmp24
    tmp26 = tl.full(tmp25.shape, 0.0, tmp25.dtype)
    tmp27 = tl.where(tmp22, tmp25, tmp26)
    tmp28 = tmp0 >= tmp20
    tl.full([1, 1], 4, tl.int64)
    tmp31 = tl.load(in_ptr4 + (x3 + 6 * y0 + 24 * y2), tmp28 & xmask &
        ymask, eviction_policy='evict_last', other=0.0)
    tmp32 = tl.load(in_ptr1 + tl.broadcast_to(y0, [XBLOCK, YBLOCK]), tmp28 &
        xmask & ymask, eviction_policy='evict_last', other=0.0)
    tmp33 = tmp31 + tmp32
    tmp34 = tl.full(tmp33.shape, 0.0, tmp33.dtype)
    tmp35 = tl.where(tmp28, tmp33, tmp34)
    tmp36 = tl.where(tmp22, tmp27, tmp35)
    tmp37 = tl.where(tmp13, tmp18, tmp36)
    tmp38 = tl.where(tmp4, tmp9, tmp37)
    tmp39 = 0.0
    tmp40 = tmp38 > tmp39
    tmp41 = 0.01
    tmp42 = tmp38 * tmp41
    tmp43 = tl.where(tmp40, tmp38, tmp42)
    tl.store(out_ptr1 + (y0 + 4 * x3 + 16 * y4), tmp43, xmask & ymask)


@triton.jit
def triton_poi_fused_cat_leaky_relu_leaky_relu_backward_5(in_ptr0, in_ptr1,
    in_ptr2, in_ptr3, in_ptr4, out_ptr0, out_ptr1, ynumel, xnumel, YBLOCK:
    tl.constexpr, XBLOCK: tl.constexpr):
    ynumel = 64
    xnumel = 4
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    y1 = yindex // 4 % 4
    x3 = xindex
    y0 = yindex % 4
    y2 = yindex // 16
    y5 = yindex
    y4 = yindex // 4
    tmp0 = y1
    tl.full([1, 1], 0, tl.int64)
    tmp3 = tl.full([1, 1], 1, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + (x3 + 8 * y0 + 32 * y2), tmp4 & xmask & ymask,
        eviction_policy='evict_last', other=0.0)
    tmp6 = tl.load(in_ptr1 + tl.broadcast_to(y0, [XBLOCK, YBLOCK]), tmp4 &
        xmask & ymask, eviction_policy='evict_last', other=0.0)
    tmp7 = tmp5 + tmp6
    tmp8 = tl.full(tmp7.shape, 0.0, tmp7.dtype)
    tmp9 = tl.where(tmp4, tmp7, tmp8)
    tmp10 = tmp0 >= tmp3
    tmp11 = tl.full([1, 1], 2, tl.int64)
    tmp12 = tmp0 < tmp11
    tmp13 = tmp10 & tmp12
    tmp14 = tl.load(in_ptr2 + (x3 + 8 * y0 + 32 * y2), tmp13 & xmask &
        ymask, eviction_policy='evict_last', other=0.0)
    tmp15 = tl.load(in_ptr1 + tl.broadcast_to(y0, [XBLOCK, YBLOCK]), tmp13 &
        xmask & ymask, eviction_policy='evict_last', other=0.0)
    tmp16 = tmp14 + tmp15
    tmp17 = tl.full(tmp16.shape, 0.0, tmp16.dtype)
    tmp18 = tl.where(tmp13, tmp16, tmp17)
    tmp19 = tmp0 >= tmp11
    tmp20 = tl.full([1, 1], 3, tl.int64)
    tmp21 = tmp0 < tmp20
    tmp22 = tmp19 & tmp21
    tmp23 = tl.load(in_ptr3 + (x3 + 8 * y0 + 32 * y2), tmp22 & xmask &
        ymask, eviction_policy='evict_last', other=0.0)
    tmp24 = tl.load(in_ptr1 + tl.broadcast_to(y0, [XBLOCK, YBLOCK]), tmp22 &
        xmask & ymask, eviction_policy='evict_last', other=0.0)
    tmp25 = tmp23 + tmp24
    tmp26 = tl.full(tmp25.shape, 0.0, tmp25.dtype)
    tmp27 = tl.where(tmp22, tmp25, tmp26)
    tmp28 = tmp0 >= tmp20
    tl.full([1, 1], 4, tl.int64)
    tmp31 = tl.load(in_ptr4 + (x3 + 8 * y0 + 32 * y2), tmp28 & xmask &
        ymask, eviction_policy='evict_last', other=0.0)
    tmp32 = tl.load(in_ptr1 + tl.broadcast_to(y0, [XBLOCK, YBLOCK]), tmp28 &
        xmask & ymask, eviction_policy='evict_last', other=0.0)
    tmp33 = tmp31 + tmp32
    tmp34 = tl.full(tmp33.shape, 0.0, tmp33.dtype)
    tmp35 = tl.where(tmp28, tmp33, tmp34)
    tmp36 = tl.where(tmp22, tmp27, tmp35)
    tmp37 = tl.where(tmp13, tmp18, tmp36)
    tmp38 = tl.where(tmp4, tmp9, tmp37)
    tmp39 = 0.0
    tmp40 = tmp38 > tmp39
    tmp41 = 0.01
    tmp42 = tmp38 * tmp41
    tmp43 = tl.where(tmp40, tmp38, tmp42)
    tmp44 = tmp43 > tmp39
    tl.store(out_ptr0 + (x3 + 4 * y5), tmp38, xmask & ymask)
    tl.store(out_ptr1 + (y0 + 4 * x3 + 16 * y4), tmp44, xmask & ymask)


@triton.jit
def triton_poi_fused_cat_6(in_ptr0, in_ptr1, in_ptr2, out_ptr0, xnumel,
    XBLOCK: tl.constexpr):
    xnumel = 768
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex % 12
    x3 = xindex // 12
    x1 = xindex // 12 % 4
    x2 = xindex // 48
    x4 = xindex
    tmp0 = x0
    tl.full([1], 0, tl.int64)
    tmp3 = tl.full([1], 4, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + (4 * x3 + x0), tmp4 & xmask, eviction_policy=
        'evict_last', other=0.0)
    tmp6 = tmp0 >= tmp3
    tmp7 = tl.full([1], 8, tl.int64)
    tmp8 = tmp0 < tmp7
    tmp9 = tmp6 & tmp8
    tmp10 = tl.load(in_ptr1 + (4 * x3 + (-4 + x0)), tmp9 & xmask,
        eviction_policy='evict_last', other=0.0)
    tmp11 = tmp0 >= tmp7
    tl.full([1], 12, tl.int64)
    tmp14 = tl.load(in_ptr2 + (x1 + 4 * (-8 + x0) + 16 * x2), tmp11 & xmask,
        eviction_policy='evict_last', other=0.0)
    tmp15 = 0.0
    tmp16 = tmp14 > tmp15
    tmp17 = 0.01
    tmp18 = tmp14 * tmp17
    tmp19 = tl.where(tmp16, tmp14, tmp18)
    tmp20 = tl.full(tmp19.shape, 0.0, tmp19.dtype)
    tmp21 = tl.where(tmp11, tmp19, tmp20)
    tmp22 = tl.where(tmp9, tmp10, tmp21)
    tmp23 = tl.where(tmp4, tmp5, tmp22)
    tl.store(out_ptr0 + x4, tmp23, xmask)


@triton.jit
def triton_poi_fused_convolution_7(in_ptr0, out_ptr0, ynumel, xnumel,
    YBLOCK: tl.constexpr, XBLOCK: tl.constexpr):
    ynumel = 48
    xnumel = 4
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex
    y0 = yindex % 12
    y1 = yindex // 12
    y3 = yindex
    tmp0 = tl.load(in_ptr0 + (y0 + 12 * x2 + 192 * y1), xmask & ymask,
        eviction_policy='evict_last')
    tl.store(out_ptr0 + (x2 + 4 * y3), tmp0, xmask & ymask)


@triton.jit
def triton_poi_fused_convolution_8(in_ptr0, out_ptr0, ynumel, xnumel,
    YBLOCK: tl.constexpr, XBLOCK: tl.constexpr):
    ynumel = 48
    xnumel = 4
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex
    y0 = yindex % 12
    y1 = yindex // 12
    y3 = yindex
    tmp0 = tl.load(in_ptr0 + (48 + y0 + 12 * x2 + 192 * y1), xmask & ymask,
        eviction_policy='evict_last')
    tl.store(out_ptr0 + (x2 + 4 * y3), tmp0, xmask & ymask)


@triton.jit
def triton_poi_fused_convolution_9(in_ptr0, out_ptr0, ynumel, xnumel,
    YBLOCK: tl.constexpr, XBLOCK: tl.constexpr):
    ynumel = 48
    xnumel = 4
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex
    y0 = yindex % 12
    y1 = yindex // 12
    y3 = yindex
    tmp0 = tl.load(in_ptr0 + (96 + y0 + 12 * x2 + 192 * y1), xmask & ymask,
        eviction_policy='evict_last')
    tl.store(out_ptr0 + (x2 + 4 * y3), tmp0, xmask & ymask)


@triton.jit
def triton_poi_fused_convolution_10(in_ptr0, out_ptr0, ynumel, xnumel,
    YBLOCK: tl.constexpr, XBLOCK: tl.constexpr):
    ynumel = 48
    xnumel = 4
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex
    y0 = yindex % 12
    y1 = yindex // 12
    y3 = yindex
    tmp0 = tl.load(in_ptr0 + (144 + y0 + 12 * x2 + 192 * y1), xmask & ymask,
        eviction_policy='evict_last')
    tl.store(out_ptr0 + (x2 + 4 * y3), tmp0, xmask & ymask)


@triton.jit
def triton_poi_fused_cat_11(in_ptr0, in_ptr1, in_ptr2, in_ptr3, in_ptr4,
    out_ptr0, ynumel, xnumel, YBLOCK: tl.constexpr, XBLOCK: tl.constexpr):
    ynumel = 64
    xnumel = 4
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    ymask = yindex < ynumel
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    y1 = yindex // 4 % 4
    x3 = xindex
    y0 = yindex % 4
    y2 = yindex // 16
    y4 = yindex // 4
    tmp0 = y1
    tl.full([1, 1], 0, tl.int64)
    tmp3 = tl.full([1, 1], 1, tl.int64)
    tmp4 = tmp0 < tmp3
    tmp5 = tl.load(in_ptr0 + (x3 + 4 * y0 + 16 * y2), tmp4 & xmask & ymask,
        eviction_policy='evict_last', other=0.0)
    tmp6 = tl.load(in_ptr1 + tl.broadcast_to(y0, [XBLOCK, YBLOCK]), tmp4 &
        xmask & ymask, eviction_policy='evict_last', other=0.0)
    tmp7 = tmp5 + tmp6
    tmp8 = tl.full(tmp7.shape, 0.0, tmp7.dtype)
    tmp9 = tl.where(tmp4, tmp7, tmp8)
    tmp10 = tmp0 >= tmp3
    tmp11 = tl.full([1, 1], 2, tl.int64)
    tmp12 = tmp0 < tmp11
    tmp13 = tmp10 & tmp12
    tmp14 = tl.load(in_ptr2 + (x3 + 4 * y0 + 16 * y2), tmp13 & xmask &
        ymask, eviction_policy='evict_last', other=0.0)
    tmp15 = tl.load(in_ptr1 + tl.broadcast_to(y0, [XBLOCK, YBLOCK]), tmp13 &
        xmask & ymask, eviction_policy='evict_last', other=0.0)
    tmp16 = tmp14 + tmp15
    tmp17 = tl.full(tmp16.shape, 0.0, tmp16.dtype)
    tmp18 = tl.where(tmp13, tmp16, tmp17)
    tmp19 = tmp0 >= tmp11
    tmp20 = tl.full([1, 1], 3, tl.int64)
    tmp21 = tmp0 < tmp20
    tmp22 = tmp19 & tmp21
    tmp23 = tl.load(in_ptr3 + (x3 + 4 * y0 + 16 * y2), tmp22 & xmask &
        ymask, eviction_policy='evict_last', other=0.0)
    tmp24 = tl.load(in_ptr1 + tl.broadcast_to(y0, [XBLOCK, YBLOCK]), tmp22 &
        xmask & ymask, eviction_policy='evict_last', other=0.0)
    tmp25 = tmp23 + tmp24
    tmp26 = tl.full(tmp25.shape, 0.0, tmp25.dtype)
    tmp27 = tl.where(tmp22, tmp25, tmp26)
    tmp28 = tmp0 >= tmp20
    tl.full([1, 1], 4, tl.int64)
    tmp31 = tl.load(in_ptr4 + (x3 + 4 * y0 + 16 * y2), tmp28 & xmask &
        ymask, eviction_policy='evict_last', other=0.0)
    tmp32 = tl.load(in_ptr1 + tl.broadcast_to(y0, [XBLOCK, YBLOCK]), tmp28 &
        xmask & ymask, eviction_policy='evict_last', other=0.0)
    tmp33 = tmp31 + tmp32
    tmp34 = tl.full(tmp33.shape, 0.0, tmp33.dtype)
    tmp35 = tl.where(tmp28, tmp33, tmp34)
    tmp36 = tl.where(tmp22, tmp27, tmp35)
    tmp37 = tl.where(tmp13, tmp18, tmp36)
    tmp38 = tl.where(tmp4, tmp9, tmp37)
    tl.store(out_ptr0 + (y0 + 4 * x3 + 16 * y4), tmp38, xmask & ymask)


@triton.jit
def triton_poi_fused_leaky_relu_backward_12(in_ptr0, out_ptr0, xnumel,
    XBLOCK: tl.constexpr):
    xnumel = 256
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + x0, xmask)
    tmp1 = 0.0
    tmp2 = tmp0 > tmp1
    tl.store(out_ptr0 + x0, tmp2, xmask)


def call(args):
    (primals_1, primals_2, primals_3, primals_4, primals_5, primals_6,
        primals_7, primals_8, primals_9) = args
    args.clear()
    assert_size_stride(primals_1, (4, 4, 4, 4), (64, 16, 4, 1))
    assert_size_stride(primals_2, (4, 4, 3), (12, 3, 1))
    assert_size_stride(primals_3, (4,), (1,))
    assert_size_stride(primals_4, (4, 4, 2), (8, 2, 1))
    assert_size_stride(primals_5, (4,), (1,))
    assert_size_stride(primals_6, (4, 4, 2), (8, 2, 1))
    assert_size_stride(primals_7, (4,), (1,))
    assert_size_stride(primals_8, (4, 12, 1), (12, 1, 1))
    assert_size_stride(primals_9, (4,), (1,))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = empty_strided_cuda((4, 4, 4), (16, 4, 1), torch.float32)
        get_raw_stream(0)
        triton_poi_fused_convolution_0[grid(16, 4)](primals_1, buf0, 16, 4,
            XBLOCK=4, YBLOCK=16, num_warps=1, num_stages=1)
        buf1 = extern_kernels.convolution(buf0, primals_2, stride=(1,),
            padding=(2,), dilation=(1,), transposed=False, output_padding=(
            0,), groups=1, bias=None)
        assert_size_stride(buf1, (4, 4, 6), (24, 6, 1))
        buf2 = buf0
        del buf0
        triton_poi_fused_convolution_1[grid(16, 4)](primals_1, buf2, 16, 4,
            XBLOCK=4, YBLOCK=16, num_warps=1, num_stages=1)
        buf3 = extern_kernels.convolution(buf2, primals_2, stride=(1,),
            padding=(2,), dilation=(1,), transposed=False, output_padding=(
            0,), groups=1, bias=None)
        assert_size_stride(buf3, (4, 4, 6), (24, 6, 1))
        buf4 = buf2
        del buf2
        triton_poi_fused_convolution_2[grid(16, 4)](primals_1, buf4, 16, 4,
            XBLOCK=4, YBLOCK=16, num_warps=1, num_stages=1)
        buf5 = extern_kernels.convolution(buf4, primals_2, stride=(1,),
            padding=(2,), dilation=(1,), transposed=False, output_padding=(
            0,), groups=1, bias=None)
        assert_size_stride(buf5, (4, 4, 6), (24, 6, 1))
        buf6 = buf4
        del buf4
        triton_poi_fused_convolution_3[grid(16, 4)](primals_1, buf6, 16, 4,
            XBLOCK=4, YBLOCK=16, num_warps=1, num_stages=1)
        buf7 = extern_kernels.convolution(buf6, primals_2, stride=(1,),
            padding=(2,), dilation=(1,), transposed=False, output_padding=(
            0,), groups=1, bias=None)
        assert_size_stride(buf7, (4, 4, 6), (24, 6, 1))
        buf9 = empty_strided_cuda((4, 4, 4, 4), (64, 16, 4, 1), torch.float32)
        triton_poi_fused_cat_leaky_relu_4[grid(64, 4)](buf1, primals_3,
            buf3, buf5, buf7, buf9, 64, 4, XBLOCK=4, YBLOCK=64, num_warps=4,
            num_stages=1)
        del buf1
        del buf3
        del buf5
        del buf7
        del primals_3
        buf10 = buf6
        del buf6
        triton_poi_fused_convolution_0[grid(16, 4)](buf9, buf10, 16, 4,
            XBLOCK=4, YBLOCK=16, num_warps=1, num_stages=1)
        buf11 = extern_kernels.convolution(buf10, primals_4, stride=(1,),
            padding=(2,), dilation=(2,), transposed=False, output_padding=(
            0,), groups=1, bias=None)
        assert_size_stride(buf11, (4, 4, 6), (24, 6, 1))
        buf12 = buf10
        del buf10
        triton_poi_fused_convolution_1[grid(16, 4)](buf9, buf12, 16, 4,
            XBLOCK=4, YBLOCK=16, num_warps=1, num_stages=1)
        buf13 = extern_kernels.convolution(buf12, primals_4, stride=(1,),
            padding=(2,), dilation=(2,), transposed=False, output_padding=(
            0,), groups=1, bias=None)
        assert_size_stride(buf13, (4, 4, 6), (24, 6, 1))
        buf14 = buf12
        del buf12
        triton_poi_fused_convolution_2[grid(16, 4)](buf9, buf14, 16, 4,
            XBLOCK=4, YBLOCK=16, num_warps=1, num_stages=1)
        buf15 = extern_kernels.convolution(buf14, primals_4, stride=(1,),
            padding=(2,), dilation=(2,), transposed=False, output_padding=(
            0,), groups=1, bias=None)
        assert_size_stride(buf15, (4, 4, 6), (24, 6, 1))
        buf16 = buf14
        del buf14
        triton_poi_fused_convolution_3[grid(16, 4)](buf9, buf16, 16, 4,
            XBLOCK=4, YBLOCK=16, num_warps=1, num_stages=1)
        buf17 = extern_kernels.convolution(buf16, primals_4, stride=(1,),
            padding=(2,), dilation=(2,), transposed=False, output_padding=(
            0,), groups=1, bias=None)
        assert_size_stride(buf17, (4, 4, 6), (24, 6, 1))
        buf19 = empty_strided_cuda((4, 4, 4, 4), (64, 16, 4, 1), torch.float32)
        triton_poi_fused_cat_leaky_relu_4[grid(64, 4)](buf11, primals_5,
            buf13, buf15, buf17, buf19, 64, 4, XBLOCK=4, YBLOCK=64,
            num_warps=4, num_stages=1)
        del buf11
        del buf13
        del buf15
        del buf17
        del primals_5
        buf20 = buf16
        del buf16
        triton_poi_fused_convolution_0[grid(16, 4)](buf19, buf20, 16, 4,
            XBLOCK=4, YBLOCK=16, num_warps=1, num_stages=1)
        buf21 = extern_kernels.convolution(buf20, primals_6, stride=(1,),
            padding=(4,), dilation=(4,), transposed=False, output_padding=(
            0,), groups=1, bias=None)
        assert_size_stride(buf21, (4, 4, 8), (32, 8, 1))
        buf22 = buf20
        del buf20
        triton_poi_fused_convolution_1[grid(16, 4)](buf19, buf22, 16, 4,
            XBLOCK=4, YBLOCK=16, num_warps=1, num_stages=1)
        buf23 = extern_kernels.convolution(buf22, primals_6, stride=(1,),
            padding=(4,), dilation=(4,), transposed=False, output_padding=(
            0,), groups=1, bias=None)
        assert_size_stride(buf23, (4, 4, 8), (32, 8, 1))
        buf24 = buf22
        del buf22
        triton_poi_fused_convolution_2[grid(16, 4)](buf19, buf24, 16, 4,
            XBLOCK=4, YBLOCK=16, num_warps=1, num_stages=1)
        buf25 = extern_kernels.convolution(buf24, primals_6, stride=(1,),
            padding=(4,), dilation=(4,), transposed=False, output_padding=(
            0,), groups=1, bias=None)
        assert_size_stride(buf25, (4, 4, 8), (32, 8, 1))
        buf26 = buf24
        del buf24
        triton_poi_fused_convolution_3[grid(16, 4)](buf19, buf26, 16, 4,
            XBLOCK=4, YBLOCK=16, num_warps=1, num_stages=1)
        buf27 = extern_kernels.convolution(buf26, primals_6, stride=(1,),
            padding=(4,), dilation=(4,), transposed=False, output_padding=(
            0,), groups=1, bias=None)
        assert_size_stride(buf27, (4, 4, 8), (32, 8, 1))
        del buf26
        buf28 = empty_strided_cuda((4, 4, 4, 4), (64, 16, 1, 4), torch.float32)
        buf39 = empty_strided_cuda((4, 4, 4, 4), (64, 16, 4, 1), torch.bool)
        triton_poi_fused_cat_leaky_relu_leaky_relu_backward_5[grid(64, 4)](
            buf21, primals_7, buf23, buf25, buf27, buf28, buf39, 64, 4,
            XBLOCK=4, YBLOCK=32, num_warps=4, num_stages=1)
        del buf21
        del buf23
        del buf25
        del buf27
        del primals_7
        buf29 = empty_strided_cuda((4, 4, 4, 12), (192, 48, 12, 1), torch.
            float32)
        triton_poi_fused_cat_6[grid(768)](buf9, buf19, buf28, buf29, 768,
            XBLOCK=256, num_warps=4, num_stages=1)
        buf30 = empty_strided_cuda((4, 12, 4), (48, 4, 1), torch.float32)
        triton_poi_fused_convolution_7[grid(48, 4)](buf29, buf30, 48, 4,
            XBLOCK=4, YBLOCK=32, num_warps=4, num_stages=1)
        buf31 = extern_kernels.convolution(buf30, primals_8, stride=(1,),
            padding=(0,), dilation=(1,), transposed=False, output_padding=(
            0,), groups=1, bias=None)
        assert_size_stride(buf31, (4, 4, 4), (16, 4, 1))
        buf32 = buf30
        del buf30
        triton_poi_fused_convolution_8[grid(48, 4)](buf29, buf32, 48, 4,
            XBLOCK=4, YBLOCK=32, num_warps=4, num_stages=1)
        buf33 = extern_kernels.convolution(buf32, primals_8, stride=(1,),
            padding=(0,), dilation=(1,), transposed=False, output_padding=(
            0,), groups=1, bias=None)
        assert_size_stride(buf33, (4, 4, 4), (16, 4, 1))
        buf34 = buf32
        del buf32
        triton_poi_fused_convolution_9[grid(48, 4)](buf29, buf34, 48, 4,
            XBLOCK=4, YBLOCK=32, num_warps=4, num_stages=1)
        buf35 = extern_kernels.convolution(buf34, primals_8, stride=(1,),
            padding=(0,), dilation=(1,), transposed=False, output_padding=(
            0,), groups=1, bias=None)
        assert_size_stride(buf35, (4, 4, 4), (16, 4, 1))
        buf36 = buf34
        del buf34
        triton_poi_fused_convolution_10[grid(48, 4)](buf29, buf36, 48, 4,
            XBLOCK=4, YBLOCK=32, num_warps=4, num_stages=1)
        buf37 = extern_kernels.convolution(buf36, primals_8, stride=(1,),
            padding=(0,), dilation=(1,), transposed=False, output_padding=(
            0,), groups=1, bias=None)
        assert_size_stride(buf37, (4, 4, 4), (16, 4, 1))
        del buf36
        buf38 = reinterpret_tensor(buf28, (4, 4, 4, 4), (64, 16, 4, 1), 0)
        del buf28
        triton_poi_fused_cat_11[grid(64, 4)](buf31, primals_9, buf33, buf35,
            buf37, buf38, 64, 4, XBLOCK=4, YBLOCK=32, num_warps=4, num_stages=1
            )
        del buf31
        del buf33
        del buf35
        del buf37
        del primals_9
        buf40 = empty_strided_cuda((4, 4, 4, 4), (64, 16, 4, 1), torch.bool)
        triton_poi_fused_leaky_relu_backward_12[grid(256)](buf19, buf40, 
            256, XBLOCK=128, num_warps=4, num_stages=1)
        buf41 = empty_strided_cuda((4, 4, 4, 4), (64, 16, 4, 1), torch.bool)
        triton_poi_fused_leaky_relu_backward_12[grid(256)](buf9, buf41, 256,
            XBLOCK=128, num_warps=4, num_stages=1)
    return (buf38, primals_2, primals_4, primals_6, primals_8,
        reinterpret_tensor(primals_1, (4, 4, 4), (64, 1, 4), 0),
        reinterpret_tensor(primals_1, (4, 4, 4), (64, 1, 4), 16),
        reinterpret_tensor(primals_1, (4, 4, 4), (64, 1, 4), 32),
        reinterpret_tensor(primals_1, (4, 4, 4), (64, 1, 4), 48),
        reinterpret_tensor(buf9, (4, 4, 4), (64, 1, 4), 0),
        reinterpret_tensor(buf9, (4, 4, 4), (64, 1, 4), 16),
        reinterpret_tensor(buf9, (4, 4, 4), (64, 1, 4), 32),
        reinterpret_tensor(buf9, (4, 4, 4), (64, 1, 4), 48),
        reinterpret_tensor(buf19, (4, 4, 4), (64, 1, 4), 0),
        reinterpret_tensor(buf19, (4, 4, 4), (64, 1, 4), 16),
        reinterpret_tensor(buf19, (4, 4, 4), (64, 1, 4), 32),
        reinterpret_tensor(buf19, (4, 4, 4), (64, 1, 4), 48),
        reinterpret_tensor(buf29, (4, 12, 4), (192, 1, 12), 0),
        reinterpret_tensor(buf29, (4, 12, 4), (192, 1, 12), 48),
        reinterpret_tensor(buf29, (4, 12, 4), (192, 1, 12), 96),
        reinterpret_tensor(buf29, (4, 12, 4), (192, 1, 12), 144), buf39,
        buf40, buf41)


class CausalConv1d(nn.Conv1d):

    def __init__(self, in_channels, out_channels, kernel_size, stride=1,
        dilation=1, groups=1, bias=True):
        self.padding = (kernel_size - 1) * dilation
        super(CausalConv1d, self).__init__(in_channels, out_channels,
            kernel_size=kernel_size, stride=stride, padding=self.padding,
            dilation=dilation, groups=groups, bias=bias)

    def forward(self, inputs):
        results = super(CausalConv1d, self).forward(inputs)
        padding = self.padding[0]
        if padding != 0:
            return results[:, :, :-padding]
        return results


class Inception_Temporal_LayerNew(nn.Module):

    def __init__(self, num_stations, In_channels, Hid_channels, Out_channels):
        super(Inception_Temporal_LayerNew, self).__init__()
        self.temporal_conv1 = CausalConv1d(In_channels, Hid_channels, 3,
            dilation=1, groups=1)
        self.temporal_conv2 = CausalConv1d(Hid_channels, Hid_channels, 2,
            dilation=2, groups=1)
        self.temporal_conv3 = CausalConv1d(Hid_channels, Hid_channels, 2,
            dilation=4, groups=1)
        self.conv1_1 = CausalConv1d(3 * Hid_channels, Out_channels, 1)
        self.num_stations = num_stations
        self.act = nn.LeakyReLU(inplace=True)

    def forward(self, input_0):
        primals_2 = self.temporal_conv1.weight
        primals_3 = self.temporal_conv1.bias
        primals_4 = self.temporal_conv2.weight
        primals_5 = self.temporal_conv2.bias
        primals_6 = self.temporal_conv3.weight
        primals_7 = self.temporal_conv3.bias
        primals_8 = self.conv1_1.weight
        primals_9 = self.conv1_1.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])
        return output[0]


Measured latency_ms: 0.481953