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
from torch._inductor.runtime import triton_helpers
from torch._inductor.runtime.triton_helpers import libdevice
import torch.nn as nn
import torch.nn.functional as F
import torch.nn.utils.weight_norm as weightNorm
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_0(in_ptr0, out_ptr0, ynumel, xnumel, YBLOCK: tl.
    constexpr, XBLOCK: tl.constexpr):
    ynumel = 96
    xnumel = 25
    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
    y3 = yindex
    y0 = yindex % 6
    y1 = yindex // 6
    tmp0 = tl.load(in_ptr0 + (x2 + 25 * y3), xmask & ymask, eviction_policy
        ='evict_last')
    tl.store(out_ptr0 + (y0 + 6 * x2 + 150 * y1), tmp0, xmask & ymask)


@triton.jit
def triton_poi_fused_1(in_ptr0, out_ptr0, ynumel, xnumel, YBLOCK: tl.
    constexpr, XBLOCK: tl.constexpr):
    ynumel = 24
    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]
    tl.full([XBLOCK, YBLOCK], True, tl.int1)
    x2 = xindex
    y3 = yindex
    y0 = yindex % 6
    y1 = yindex // 6
    tmp0 = tl.load(in_ptr0 + (x2 + 4096 * y3), ymask, eviction_policy=
        'evict_last')
    tl.store(out_ptr0 + (y0 + 6 * x2 + 24576 * y1), tmp0, ymask)


@triton.jit
def triton_poi_fused_2(in_ptr0, out_ptr0, ynumel, xnumel, YBLOCK: tl.
    constexpr, XBLOCK: tl.constexpr):
    ynumel = 512
    xnumel = 25
    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
    y3 = yindex
    y0 = yindex % 16
    y1 = yindex // 16
    tmp0 = tl.load(in_ptr0 + (x2 + 25 * y3), xmask & ymask, eviction_policy
        ='evict_last')
    tl.store(out_ptr0 + (y0 + 16 * x2 + 400 * y1), tmp0, xmask & ymask)


@triton.jit
def triton_poi_fused_3(in_ptr0, out_ptr0, ynumel, xnumel, YBLOCK: tl.
    constexpr, XBLOCK: tl.constexpr):
    xnumel = 25
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    tl.full([XBLOCK, YBLOCK], True, tl.int1)
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex
    y3 = yindex
    y0 = yindex % 32
    y1 = yindex // 32
    tmp0 = tl.load(in_ptr0 + (x2 + 25 * y3), xmask, eviction_policy=
        'evict_last')
    tl.store(out_ptr0 + (y0 + 32 * x2 + 800 * y1), tmp0, xmask)


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


@triton.jit
def triton_per_fused__weight_norm_interface_5(in_out_ptr0, in_ptr0, xnumel,
    rnumel, XBLOCK: tl.constexpr):
    xnumel = 16
    rnumel = 150
    RBLOCK: tl.constexpr = 256
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    rindex = tl.arange(0, RBLOCK)[None, :]
    rmask = rindex < rnumel
    r1 = rindex
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (r1 + 150 * x0), rmask & xmask, other=0.0)
    tmp1 = tmp0 * tmp0
    tmp2 = tl.broadcast_to(tmp1, [XBLOCK, RBLOCK])
    tmp4 = tl.where(rmask & xmask, tmp2, 0)
    tmp5 = tl.sum(tmp4, 1)[:, None]
    tmp6 = libdevice.sqrt(tmp5)
    tl.debug_barrier()
    tl.store(in_out_ptr0 + x0, tmp6, xmask)


@triton.jit
def triton_poi_fused__weight_norm_interface_convolution_6(in_ptr0, in_ptr1,
    in_ptr2, out_ptr0, out_ptr1, ynumel, xnumel, YBLOCK: tl.constexpr,
    XBLOCK: tl.constexpr):
    ynumel = 96
    xnumel = 25
    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 % 6
    y1 = yindex // 6
    y3 = yindex
    tmp0 = tl.load(in_ptr0 + (y0 + 6 * x2 + 150 * y1), xmask & ymask,
        eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + y1, ymask, eviction_policy='evict_last')
    tmp2 = tl.load(in_ptr2 + y1, ymask, eviction_policy='evict_last')
    tmp3 = tmp1 / tmp2
    tmp4 = tmp0 * tmp3
    tl.store(out_ptr0 + (x2 + 25 * y3), tmp4, xmask & ymask)
    tl.store(out_ptr1 + (y0 + 6 * x2 + 150 * y1), tmp4, xmask & ymask)


@triton.jit
def triton_poi_fused_add_convolution_relu_sub_threshold_backward_7(in_ptr0,
    in_ptr1, in_ptr2, out_ptr0, out_ptr1, xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x2 = xindex
    x0 = xindex % 16
    tmp0 = tl.load(in_ptr0 + x2, None)
    tmp1 = tl.load(in_ptr1 + x0, None, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + 0)
    tmp4 = tl.broadcast_to(tmp3, [XBLOCK])
    tmp2 = tmp0 + tmp1
    tmp5 = tmp2 - tmp4
    tmp6 = tl.full([1], 0, tl.int32)
    tmp7 = triton_helpers.maximum(tmp6, tmp5)
    tmp8 = tmp7 + tmp4
    tmp9 = 0.0
    tmp10 = tmp7 <= tmp9
    tl.store(out_ptr0 + x2, tmp8, None)
    tl.store(out_ptr1 + x2, tmp10, None)


@triton.jit
def triton_per_fused__weight_norm_interface_8(in_out_ptr0, in_ptr0, xnumel,
    rnumel):
    XBLOCK: tl.constexpr = 1
    rnumel = 400
    RBLOCK: tl.constexpr = 512
    xoffset = tl.program_id(0) * XBLOCK
    xindex = tl.full([1], xoffset, tl.int32)
    tl.full([RBLOCK], True, tl.int1)
    rindex = tl.arange(0, RBLOCK)[:]
    rmask = rindex < rnumel
    r1 = rindex
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (r1 + 400 * x0), rmask, other=0.0)
    tmp1 = tmp0 * tmp0
    tmp2 = tl.broadcast_to(tmp1, [RBLOCK])
    tmp4 = tl.where(rmask, tmp2, 0)
    tmp5 = triton_helpers.promote_to_tensor(tl.sum(tmp4, 0))
    tmp6 = libdevice.sqrt(tmp5)
    tl.debug_barrier()
    tl.store(in_out_ptr0 + x0, tmp6, None)


@triton.jit
def triton_poi_fused__weight_norm_interface_convolution_9(in_ptr0, in_ptr1,
    in_ptr2, out_ptr0, out_ptr1, ynumel, xnumel, YBLOCK: tl.constexpr,
    XBLOCK: tl.constexpr):
    ynumel = 512
    xnumel = 25
    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 % 16
    y1 = yindex // 16
    y3 = yindex
    tmp0 = tl.load(in_ptr0 + (y0 + 16 * x2 + 400 * y1), xmask & ymask,
        eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + y1, ymask, eviction_policy='evict_last')
    tmp2 = tl.load(in_ptr2 + y1, ymask, eviction_policy='evict_last')
    tmp3 = tmp1 / tmp2
    tmp4 = tmp0 * tmp3
    tl.store(out_ptr0 + (x2 + 25 * y3), tmp4, xmask & ymask)
    tl.store(out_ptr1 + (y0 + 16 * x2 + 400 * y1), tmp4, xmask & ymask)


@triton.jit
def triton_poi_fused_add_convolution_relu_sub_threshold_backward_10(in_ptr0,
    in_ptr1, in_ptr2, out_ptr0, out_ptr1, xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x2 = xindex
    x0 = xindex % 32
    tmp0 = tl.load(in_ptr0 + x2, None)
    tmp1 = tl.load(in_ptr1 + x0, None, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + 0)
    tmp4 = tl.broadcast_to(tmp3, [XBLOCK])
    tmp2 = tmp0 + tmp1
    tmp5 = tmp2 - tmp4
    tmp6 = tl.full([1], 0, tl.int32)
    tmp7 = triton_helpers.maximum(tmp6, tmp5)
    tmp8 = tmp7 + tmp4
    tmp9 = 0.0
    tmp10 = tmp7 <= tmp9
    tl.store(out_ptr0 + x2, tmp8, None)
    tl.store(out_ptr1 + x2, tmp10, None)


@triton.jit
def triton_per_fused__weight_norm_interface_11(in_out_ptr0, in_ptr0, xnumel,
    rnumel):
    XBLOCK: tl.constexpr = 1
    rnumel = 800
    RBLOCK: tl.constexpr = 1024
    xoffset = tl.program_id(0) * XBLOCK
    xindex = tl.full([1], xoffset, tl.int32)
    tl.full([RBLOCK], True, tl.int1)
    rindex = tl.arange(0, RBLOCK)[:]
    rmask = rindex < rnumel
    r1 = rindex
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (r1 + 800 * x0), rmask, other=0.0)
    tmp1 = tmp0 * tmp0
    tmp2 = tl.broadcast_to(tmp1, [RBLOCK])
    tmp4 = tl.where(rmask, tmp2, 0)
    tmp5 = triton_helpers.promote_to_tensor(tl.sum(tmp4, 0))
    tmp6 = libdevice.sqrt(tmp5)
    tl.debug_barrier()
    tl.store(in_out_ptr0 + x0, tmp6, None)


@triton.jit
def triton_poi_fused__weight_norm_interface_convolution_12(in_ptr0, in_ptr1,
    in_ptr2, out_ptr0, out_ptr1, ynumel, xnumel, YBLOCK: tl.constexpr,
    XBLOCK: tl.constexpr):
    xnumel = 25
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    tl.full([XBLOCK, YBLOCK], True, tl.int1)
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex
    y0 = yindex % 32
    y1 = yindex // 32
    y3 = yindex
    tmp0 = tl.load(in_ptr0 + (y0 + 32 * x2 + 800 * y1), xmask,
        eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + y1, None, eviction_policy='evict_last')
    tmp2 = tl.load(in_ptr2 + y1, None, eviction_policy='evict_last')
    tmp3 = tmp1 / tmp2
    tmp4 = tmp0 * tmp3
    tl.store(out_ptr0 + (x2 + 25 * y3), tmp4, xmask)
    tl.store(out_ptr1 + (y0 + 32 * x2 + 800 * y1), tmp4, xmask)


@triton.jit
def triton_poi_fused_add_convolution_relu_sub_threshold_backward_13(in_ptr0,
    in_ptr1, in_ptr2, out_ptr0, out_ptr1, xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x2 = xindex
    x0 = xindex % 64
    tmp0 = tl.load(in_ptr0 + x2, None)
    tmp1 = tl.load(in_ptr1 + x0, None, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + 0)
    tmp4 = tl.broadcast_to(tmp3, [XBLOCK])
    tmp2 = tmp0 + tmp1
    tmp5 = tmp2 - tmp4
    tmp6 = tl.full([1], 0, tl.int32)
    tmp7 = triton_helpers.maximum(tmp6, tmp5)
    tmp8 = tmp7 + tmp4
    tmp9 = 0.0
    tmp10 = tmp7 <= tmp9
    tl.store(out_ptr0 + x2, tmp8, None)
    tl.store(out_ptr1 + x2, tmp10, None)


@triton.jit
def triton_red_fused__weight_norm_interface_14(in_out_ptr0, in_ptr0, xnumel,
    rnumel, XBLOCK: tl.constexpr, RBLOCK: tl.constexpr):
    xnumel = 128
    rnumel = 1600
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    rbase = tl.arange(0, RBLOCK)[None, :]
    x0 = xindex
    _tmp3 = tl.full([XBLOCK, RBLOCK], 0, tl.float32)
    for roffset in range(0, rnumel, RBLOCK):
        rindex = roffset + rbase
        rmask = rindex < rnumel
        r1 = rindex
        tmp0 = tl.load(in_ptr0 + (r1 + 1600 * x0), rmask & xmask,
            eviction_policy='evict_first', other=0.0)
        tmp1 = tmp0 * tmp0
        tmp2 = tl.broadcast_to(tmp1, [XBLOCK, RBLOCK])
        tmp4 = _tmp3 + tmp2
        _tmp3 = tl.where(rmask & xmask, tmp4, _tmp3)
    tmp3 = tl.sum(_tmp3, 1)[:, None]
    tmp5 = libdevice.sqrt(tmp3)
    tl.debug_barrier()
    tl.store(in_out_ptr0 + x0, tmp5, xmask)


@triton.jit
def triton_poi_fused__weight_norm_interface_convolution_15(in_ptr0, in_ptr1,
    in_ptr2, out_ptr0, out_ptr1, ynumel, xnumel, YBLOCK: tl.constexpr,
    XBLOCK: tl.constexpr):
    xnumel = 25
    yoffset = tl.program_id(1) * YBLOCK
    yindex = yoffset + tl.arange(0, YBLOCK)[None, :]
    tl.full([XBLOCK, YBLOCK], True, tl.int1)
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
    xmask = xindex < xnumel
    x2 = xindex
    y0 = yindex % 64
    y1 = yindex // 64
    y3 = yindex
    tmp0 = tl.load(in_ptr0 + (y0 + 64 * x2 + 1600 * y1), xmask,
        eviction_policy='evict_last')
    tmp1 = tl.load(in_ptr1 + y1, None, eviction_policy='evict_last')
    tmp2 = tl.load(in_ptr2 + y1, None, eviction_policy='evict_last')
    tmp3 = tmp1 / tmp2
    tmp4 = tmp0 * tmp3
    tl.store(out_ptr0 + (x2 + 25 * y3), tmp4, xmask)
    tl.store(out_ptr1 + (y0 + 64 * x2 + 1600 * y1), tmp4, xmask)


@triton.jit
def triton_poi_fused_add_convolution_relu_sub_threshold_backward_16(in_ptr0,
    in_ptr1, in_ptr2, out_ptr0, out_ptr1, xnumel, XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x2 = xindex
    x0 = xindex % 128
    tmp0 = tl.load(in_ptr0 + x2, None)
    tmp1 = tl.load(in_ptr1 + x0, None, eviction_policy='evict_last')
    tmp3 = tl.load(in_ptr2 + 0)
    tmp4 = tl.broadcast_to(tmp3, [XBLOCK])
    tmp2 = tmp0 + tmp1
    tmp5 = tmp2 - tmp4
    tmp6 = tl.full([1], 0, tl.int32)
    tmp7 = triton_helpers.maximum(tmp6, tmp5)
    tmp8 = tmp7 + tmp4
    tmp9 = 0.0
    tmp10 = tmp7 <= tmp9
    tl.store(out_ptr0 + x2, tmp8, None)
    tl.store(out_ptr1 + x2, tmp10, None)


@triton.jit
def triton_per_fused__weight_norm_interface_17(in_out_ptr0, in_ptr0,
    in_ptr1, out_ptr0, xnumel, rnumel, XBLOCK: tl.constexpr):
    RBLOCK: tl.constexpr = 128
    xoffset = tl.program_id(0) * XBLOCK
    xoffset + tl.arange(0, XBLOCK)[:, None]
    tl.full([XBLOCK, RBLOCK], True, tl.int1)
    rindex = tl.arange(0, RBLOCK)[None, :]
    tl.full([XBLOCK, RBLOCK], True, tl.int1)
    r0 = rindex
    tmp0 = tl.load(in_ptr0 + r0, None)
    tmp6 = tl.load(in_ptr1 + 0)
    tmp7 = tl.broadcast_to(tmp6, [XBLOCK, RBLOCK])
    tmp1 = tmp0 * tmp0
    tmp2 = tl.broadcast_to(tmp1, [XBLOCK, RBLOCK])
    tmp4 = tl.sum(tmp2, 1)[:, None]
    tmp5 = libdevice.sqrt(tmp4)
    tmp8 = tmp7 / tmp5
    tmp9 = tmp0 * tmp8
    tl.debug_barrier()
    tl.store(in_out_ptr0 + tl.full([XBLOCK, 1], 0, tl.int32), tmp5, None)
    tl.store(out_ptr0 + tl.broadcast_to(r0, [XBLOCK, RBLOCK]), tmp9, None)


@triton.jit
def triton_poi_fused_convolution_18(in_out_ptr0, in_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xnumel = 64
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_out_ptr0 + x0, xmask)
    tmp1 = tl.load(in_ptr0 + 0)
    tmp2 = tl.broadcast_to(tmp1, [XBLOCK])
    tmp3 = tmp0 + tmp2
    tl.store(in_out_ptr0 + x0, 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) = args
    args.clear()
    assert_size_stride(primals_1, (16, 1, 1, 1), (1, 1, 1, 1))
    assert_size_stride(primals_2, (16, 6, 5, 5), (150, 25, 5, 1))
    assert_size_stride(primals_3, (16,), (1,))
    assert_size_stride(primals_4, (4, 6, 64, 64), (24576, 4096, 64, 1))
    assert_size_stride(primals_5, (1,), (1,))
    assert_size_stride(primals_6, (32, 1, 1, 1), (1, 1, 1, 1))
    assert_size_stride(primals_7, (32, 16, 5, 5), (400, 25, 5, 1))
    assert_size_stride(primals_8, (32,), (1,))
    assert_size_stride(primals_9, (1,), (1,))
    assert_size_stride(primals_10, (64, 1, 1, 1), (1, 1, 1, 1))
    assert_size_stride(primals_11, (64, 32, 5, 5), (800, 25, 5, 1))
    assert_size_stride(primals_12, (64,), (1,))
    assert_size_stride(primals_13, (1,), (1,))
    assert_size_stride(primals_14, (128, 1, 1, 1), (1, 1, 1, 1))
    assert_size_stride(primals_15, (128, 64, 5, 5), (1600, 25, 5, 1))
    assert_size_stride(primals_16, (128,), (1,))
    assert_size_stride(primals_17, (1,), (1,))
    assert_size_stride(primals_18, (1, 1, 1, 1), (1, 1, 1, 1))
    assert_size_stride(primals_19, (1, 128, 1, 1), (128, 1, 1, 1))
    assert_size_stride(primals_20, (1,), (1,))
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = empty_strided_cuda((16, 6, 5, 5), (150, 1, 30, 6), torch.float32
            )
        get_raw_stream(0)
        triton_poi_fused_0[grid(96, 25)](primals_2, buf0, 96, 25, XBLOCK=32,
            YBLOCK=32, num_warps=4, num_stages=1)
        del primals_2
        buf1 = empty_strided_cuda((4, 6, 64, 64), (24576, 1, 384, 6), torch
            .float32)
        triton_poi_fused_1[grid(24, 4096)](primals_4, buf1, 24, 4096,
            XBLOCK=32, YBLOCK=32, num_warps=4, num_stages=1)
        del primals_4
        buf2 = empty_strided_cuda((32, 16, 5, 5), (400, 1, 80, 16), torch.
            float32)
        triton_poi_fused_2[grid(512, 25)](primals_7, buf2, 512, 25, XBLOCK=
            32, YBLOCK=32, num_warps=4, num_stages=1)
        del primals_7
        buf3 = empty_strided_cuda((64, 32, 5, 5), (800, 1, 160, 32), torch.
            float32)
        triton_poi_fused_3[grid(2048, 25)](primals_11, buf3, 2048, 25,
            XBLOCK=32, YBLOCK=32, num_warps=4, num_stages=1)
        del primals_11
        buf4 = empty_strided_cuda((128, 64, 5, 5), (1600, 1, 320, 64),
            torch.float32)
        triton_poi_fused_4[grid(8192, 25)](primals_15, buf4, 8192, 25,
            XBLOCK=32, YBLOCK=32, num_warps=4, num_stages=1)
        del primals_15
        buf5 = empty_strided_cuda((16, 1, 1, 1), (1, 16, 16, 16), torch.float32
            )
        buf6 = reinterpret_tensor(buf5, (16, 1, 1, 1), (1, 1, 1, 1), 0)
        del buf5
        triton_per_fused__weight_norm_interface_5[grid(16)](buf6, buf0, 16,
            150, XBLOCK=1, num_warps=2, num_stages=1)
        buf7 = empty_strided_cuda((16, 6, 5, 5), (150, 25, 5, 1), torch.float32
            )
        buf8 = empty_strided_cuda((16, 6, 5, 5), (150, 1, 30, 6), torch.float32
            )
        triton_poi_fused__weight_norm_interface_convolution_6[grid(96, 25)](
            buf0, primals_1, buf6, buf7, buf8, 96, 25, XBLOCK=32, YBLOCK=8,
            num_warps=4, num_stages=1)
        buf9 = extern_kernels.convolution(buf1, buf8, stride=(2, 2),
            padding=(2, 2), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf9, (4, 16, 32, 32), (16384, 1, 512, 16))
        del buf8
        buf10 = empty_strided_cuda((4, 16, 32, 32), (16384, 1, 512, 16),
            torch.float32)
        buf37 = empty_strided_cuda((4, 16, 32, 32), (16384, 1, 512, 16),
            torch.bool)
        triton_poi_fused_add_convolution_relu_sub_threshold_backward_7[grid
            (65536)](buf9, primals_3, primals_5, buf10, buf37, 65536,
            XBLOCK=512, num_warps=4, num_stages=1)
        del buf9
        del primals_3
        del primals_5
        buf11 = empty_strided_cuda((32, 1, 1, 1), (1, 32, 32, 32), torch.
            float32)
        buf12 = reinterpret_tensor(buf11, (32, 1, 1, 1), (1, 1, 1, 1), 0)
        del buf11
        triton_per_fused__weight_norm_interface_8[grid(32)](buf12, buf2, 32,
            400, num_warps=4, num_stages=1)
        buf13 = empty_strided_cuda((32, 16, 5, 5), (400, 25, 5, 1), torch.
            float32)
        buf14 = empty_strided_cuda((32, 16, 5, 5), (400, 1, 80, 16), torch.
            float32)
        triton_poi_fused__weight_norm_interface_convolution_9[grid(512, 25)](
            buf2, primals_6, buf12, buf13, buf14, 512, 25, XBLOCK=1, YBLOCK
            =256, num_warps=4, num_stages=1)
        buf15 = extern_kernels.convolution(buf10, buf14, stride=(2, 2),
            padding=(2, 2), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf15, (4, 32, 16, 16), (8192, 1, 512, 32))
        del buf14
        buf16 = empty_strided_cuda((4, 32, 16, 16), (8192, 1, 512, 32),
            torch.float32)
        buf36 = empty_strided_cuda((4, 32, 16, 16), (8192, 1, 512, 32),
            torch.bool)
        triton_poi_fused_add_convolution_relu_sub_threshold_backward_10[grid
            (32768)](buf15, primals_8, primals_9, buf16, buf36, 32768,
            XBLOCK=256, num_warps=4, num_stages=1)
        del buf15
        del primals_8
        del primals_9
        buf17 = empty_strided_cuda((64, 1, 1, 1), (1, 64, 64, 64), torch.
            float32)
        buf18 = reinterpret_tensor(buf17, (64, 1, 1, 1), (1, 1, 1, 1), 0)
        del buf17
        triton_per_fused__weight_norm_interface_11[grid(64)](buf18, buf3, 
            64, 800, num_warps=8, num_stages=1)
        buf19 = empty_strided_cuda((64, 32, 5, 5), (800, 25, 5, 1), torch.
            float32)
        buf20 = empty_strided_cuda((64, 32, 5, 5), (800, 1, 160, 32), torch
            .float32)
        triton_poi_fused__weight_norm_interface_convolution_12[grid(2048, 25)](
            buf3, primals_10, buf18, buf19, buf20, 2048, 25, XBLOCK=32,
            YBLOCK=32, num_warps=4, num_stages=1)
        buf21 = extern_kernels.convolution(buf16, buf20, stride=(2, 2),
            padding=(2, 2), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf21, (4, 64, 8, 8), (4096, 1, 512, 64))
        del buf20
        buf22 = empty_strided_cuda((4, 64, 8, 8), (4096, 1, 512, 64), torch
            .float32)
        buf35 = empty_strided_cuda((4, 64, 8, 8), (4096, 1, 512, 64), torch
            .bool)
        triton_poi_fused_add_convolution_relu_sub_threshold_backward_13[grid
            (16384)](buf21, primals_12, primals_13, buf22, buf35, 16384,
            XBLOCK=128, num_warps=4, num_stages=1)
        del buf21
        del primals_12
        del primals_13
        buf23 = empty_strided_cuda((128, 1, 1, 1), (1, 128, 128, 128),
            torch.float32)
        buf24 = reinterpret_tensor(buf23, (128, 1, 1, 1), (1, 1, 1, 1), 0)
        del buf23
        triton_red_fused__weight_norm_interface_14[grid(128)](buf24, buf4, 
            128, 1600, XBLOCK=1, RBLOCK=2048, num_warps=16, num_stages=1)
        buf25 = empty_strided_cuda((128, 64, 5, 5), (1600, 25, 5, 1), torch
            .float32)
        buf26 = empty_strided_cuda((128, 64, 5, 5), (1600, 1, 320, 64),
            torch.float32)
        triton_poi_fused__weight_norm_interface_convolution_15[grid(8192, 25)](
            buf4, primals_14, buf24, buf25, buf26, 8192, 25, XBLOCK=32,
            YBLOCK=128, num_warps=8, num_stages=1)
        buf27 = extern_kernels.convolution(buf22, buf26, stride=(2, 2),
            padding=(2, 2), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf27, (4, 128, 4, 4), (2048, 1, 512, 128))
        del buf26
        buf28 = empty_strided_cuda((4, 128, 4, 4), (2048, 1, 512, 128),
            torch.float32)
        buf34 = empty_strided_cuda((4, 128, 4, 4), (2048, 1, 512, 128),
            torch.bool)
        triton_poi_fused_add_convolution_relu_sub_threshold_backward_16[grid
            (8192)](buf27, primals_16, primals_17, buf28, buf34, 8192,
            XBLOCK=256, num_warps=4, num_stages=1)
        del buf27
        del primals_16
        del primals_17
        buf29 = empty_strided_cuda((1, 1, 1, 1), (1, 1, 1, 1), torch.float32)
        buf30 = buf29
        del buf29
        buf31 = empty_strided_cuda((1, 128, 1, 1), (128, 1, 1, 1), torch.
            float32)
        triton_per_fused__weight_norm_interface_17[grid(1)](buf30,
            primals_19, primals_18, buf31, 1, 128, XBLOCK=1, num_warps=2,
            num_stages=1)
        buf32 = extern_kernels.convolution(buf28, buf31, stride=(1, 1),
            padding=(0, 0), dilation=(1, 1), transposed=False,
            output_padding=(0, 0), groups=1, bias=None)
        assert_size_stride(buf32, (4, 1, 4, 4), (16, 1, 4, 1))
        buf33 = buf32
        del buf32
        triton_poi_fused_convolution_18[grid(64)](buf33, primals_20, 64,
            XBLOCK=64, num_warps=1, num_stages=1)
        del primals_20
    return (reinterpret_tensor(buf33, (1, 64), (64, 1), 0), buf7, buf13,
        buf19, buf25, buf31, primals_1, buf0, buf1, primals_6, buf2,
        primals_10, buf3, primals_14, buf4, primals_18, primals_19, buf6,
        buf7, buf10, buf12, buf13, buf16, buf18, buf19, buf22, buf24, buf25,
        buf28, buf30, buf31, buf34, buf35, buf36, buf37)


class TReLU(nn.Module):

    def __init__(self):
        super(TReLU, self).__init__()
        self.alpha = nn.Parameter(torch.FloatTensor(1), requires_grad=True)
        self.alpha.data.fill_(0)

    def forward(self, x):
        x = F.relu(x - self.alpha) + self.alpha
        return x


class DiscriminatorNew(nn.Module):

    def __init__(self):
        super(DiscriminatorNew, self).__init__()
        self.conv0 = weightNorm(nn.Conv2d(6, 16, 5, 2, 2))
        self.conv1 = weightNorm(nn.Conv2d(16, 32, 5, 2, 2))
        self.conv2 = weightNorm(nn.Conv2d(32, 64, 5, 2, 2))
        self.conv3 = weightNorm(nn.Conv2d(64, 128, 5, 2, 2))
        self.conv4 = weightNorm(nn.Conv2d(128, 1, 1, 1, 0))
        self.relu0 = TReLU()
        self.relu1 = TReLU()
        self.relu2 = TReLU()
        self.relu3 = TReLU()

    def forward(self, input_0):
        primals_3 = self.conv0.bias
        primals_1 = self.conv0.weight_g
        primals_2 = self.conv0.weight_v
        primals_8 = self.conv1.bias
        primals_6 = self.conv1.weight_g
        primals_7 = self.conv1.weight_v
        primals_12 = self.conv2.bias
        primals_10 = self.conv2.weight_g
        primals_11 = self.conv2.weight_v
        primals_16 = self.conv3.bias
        primals_14 = self.conv3.weight_g
        primals_15 = self.conv3.weight_v
        primals_5 = self.conv4.bias
        primals_18 = self.conv4.weight_g
        primals_19 = self.conv4.weight_v
        primals_9 = self.relu0.alpha
        primals_13 = self.relu1.alpha
        primals_17 = self.relu2.alpha
        primals_20 = self.relu3.alpha
        primals_4 = 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])
        return output[0]


Measured latency_ms: 0.016658