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
import numpy as np
from torch import nn
import torch._utils
assert_size_stride = torch._C._dynamo.guards.assert_size_stride
empty_strided_cuda = torch._C._dynamo.guards._empty_strided_cuda


@triton.jit
def triton_poi_fused_convolution_relu_0(in_out_ptr0, in_ptr0, xnumel,
    XBLOCK: tl.constexpr):
    xnumel = 192914176
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x1 = xindex // 6028568 % 8
    tmp0 = tl.load(in_out_ptr0 + x3, xmask)
    tmp1 = tl.load(in_ptr0 + x1, xmask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = tl.full([1], 0, tl.int32)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tl.store(in_out_ptr0 + x3, tmp4, xmask)


@triton.jit
def triton_poi_fused_convolution_relu_1(in_ptr0, in_ptr1, out_ptr0, xnumel,
    XBLOCK: tl.constexpr):
    xnumel = 192914176
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x4 = xindex
    x2 = xindex // 6028568 % 8
    x0 = xindex % 33124
    x5 = xindex // 33124
    tmp0 = tl.load(in_ptr0 + x4, xmask)
    tmp1 = tl.load(in_ptr1 + x2, xmask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = tl.full([1], 0, tl.int32)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tl.store(out_ptr0 + (x0 + 33152 * x5), tmp4, xmask)


@triton.jit
def triton_poi_fused_convolution_relu_2(in_out_ptr0, in_ptr0, xnumel,
    XBLOCK: tl.constexpr):
    xnumel = 107850176
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x1 = xindex // 1685159 % 16
    tmp0 = tl.load(in_out_ptr0 + x3, xmask)
    tmp1 = tl.load(in_ptr0 + x1, xmask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = tl.full([1], 0, tl.int32)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tl.store(in_out_ptr0 + x3, tmp4, xmask)


@triton.jit
def triton_poi_fused_convolution_relu_3(in_ptr0, in_ptr1, out_ptr0, xnumel,
    XBLOCK: tl.constexpr):
    xnumel = 107850176
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x4 = xindex
    x2 = xindex // 1685159 % 16
    x0 = xindex % 14161
    x5 = xindex // 14161
    tmp0 = tl.load(in_ptr0 + x4, xmask)
    tmp1 = tl.load(in_ptr1 + x2, xmask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = tl.full([1], 0, tl.int32)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tl.store(out_ptr0 + (x0 + 14176 * x5), tmp4, xmask)


@triton.jit
def triton_poi_fused_convolution_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)
    x3 = xindex
    x1 = xindex // 216000 % 32
    tmp0 = tl.load(in_out_ptr0 + x3, None)
    tmp1 = tl.load(in_ptr0 + x1, None, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = tl.full([1], 0, tl.int32)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tl.store(in_out_ptr0 + x3, tmp4, None)


@triton.jit
def triton_poi_fused_convolution_relu_5(in_ptr0, in_ptr1, out_ptr0, xnumel,
    XBLOCK: tl.constexpr):
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    tl.full([XBLOCK], True, tl.int1)
    x4 = xindex
    x2 = xindex // 216000 % 32
    x0 = xindex % 3600
    x5 = xindex // 3600
    tmp0 = tl.load(in_ptr0 + x4, None)
    tmp1 = tl.load(in_ptr1 + x2, None, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = tl.full([1], 0, tl.int32)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tl.store(out_ptr0 + (x0 + 3616 * x5), tmp4, None)


@triton.jit
def triton_poi_fused_convolution_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)
    x3 = xindex
    x1 = xindex // 27000 % 64
    tmp0 = tl.load(in_out_ptr0 + x3, None)
    tmp1 = tl.load(in_ptr0 + x1, None, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = tl.full([1], 0, tl.int32)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tl.store(in_out_ptr0 + x3, tmp4, None)


@triton.jit
def triton_poi_fused_convolution_relu_7(in_ptr0, in_ptr1, out_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 // 27000 % 64
    x0 = xindex % 27000
    x4 = xindex // 27000
    tmp0 = tl.load(in_ptr0 + x3, None)
    tmp1 = tl.load(in_ptr1 + x1, None, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = tl.full([1], 0, tl.int32)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tl.store(out_ptr0 + (x0 + 27008 * x4), tmp4, None)


@triton.jit
def triton_poi_fused_convolution_relu_8(in_out_ptr0, in_ptr0, xnumel,
    XBLOCK: tl.constexpr):
    xnumel = 864000
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x1 = xindex // 3375 % 64
    tmp0 = tl.load(in_out_ptr0 + x3, xmask)
    tmp1 = tl.load(in_ptr0 + x1, xmask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = tl.full([1], 0, tl.int32)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tl.store(in_out_ptr0 + x3, tmp4, xmask)


@triton.jit
def triton_poi_fused_convolution_relu_9(in_ptr0, in_ptr1, out_ptr0, xnumel,
    XBLOCK: tl.constexpr):
    xnumel = 864000
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x3 = xindex
    x1 = xindex // 3375 % 64
    x0 = xindex % 3375
    x4 = xindex // 3375
    tmp0 = tl.load(in_ptr0 + x3, xmask)
    tmp1 = tl.load(in_ptr1 + x1, xmask, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = tl.full([1], 0, tl.int32)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tl.store(out_ptr0 + (x0 + 3392 * x4), tmp4, xmask)


@triton.jit
def triton_poi_fused_convolution_relu_10(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 // 8 % 512
    tmp0 = tl.load(in_out_ptr0 + x3, None)
    tmp1 = tl.load(in_ptr0 + x1, None, eviction_policy='evict_last')
    tmp2 = tmp0 + tmp1
    tmp3 = tl.full([1], 0, tl.int32)
    tmp4 = triton_helpers.maximum(tmp3, tmp2)
    tl.store(in_out_ptr0 + x3, tmp4, None)


@triton.jit
def triton_poi_fused_convolution_11(in_out_ptr0, in_ptr0, xnumel, XBLOCK:
    tl.constexpr):
    xnumel = 32
    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)


@triton.jit
def triton_poi_fused_mul_12(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 864000
    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.01
    tmp2 = tmp0 * tmp1
    tl.store(out_ptr0 + x0, tmp2, xmask)


@triton.jit
def triton_poi_fused_add_13(in_out_ptr0, in_ptr0, in_ptr1, xnumel, XBLOCK:
    tl.constexpr):
    xnumel = 864
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x4 = xindex
    x0 = xindex % 6
    x1 = xindex // 6 % 6
    x2 = xindex // 36 % 6
    x3 = xindex // 216
    tmp0 = tl.load(in_out_ptr0 + x4, xmask)
    tmp1 = tl.load(in_ptr0 + (1205 + x0 + 15 * x1 + 225 * x2 + 3375 * x3),
        xmask)
    tmp2 = tl.load(in_ptr1 + 0)
    tmp3 = tl.broadcast_to(tmp2, [XBLOCK])
    tmp4 = tmp1 + tmp3
    tmp5 = tmp0 + tmp4
    tl.store(in_out_ptr0 + x4, tmp5, xmask)


@triton.jit
def triton_poi_fused_mul_14(in_ptr0, out_ptr0, xnumel, XBLOCK: tl.constexpr):
    xnumel = 3456000
    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.0001
    tmp2 = tmp0 * tmp1
    tl.store(out_ptr0 + x0, tmp2, xmask)


@triton.jit
def triton_poi_fused_add_15(in_out_ptr0, in_ptr0, in_ptr1, xnumel, XBLOCK:
    tl.constexpr):
    xnumel = 10976
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x4 = xindex
    x0 = xindex % 14
    x1 = xindex // 14 % 14
    x2 = xindex // 196 % 14
    x3 = xindex // 2744
    tmp0 = tl.load(in_out_ptr0 + x4, xmask)
    tmp1 = tl.load(in_ptr0 + (8379 + x0 + 30 * x1 + 900 * x2 + 27000 * x3),
        xmask)
    tmp2 = tl.load(in_ptr1 + 0)
    tmp3 = tl.broadcast_to(tmp2, [XBLOCK])
    tmp4 = tmp1 + tmp3
    tmp5 = tmp0 + tmp4
    tl.store(in_out_ptr0 + x4, tmp5, xmask)


@triton.jit
def triton_poi_fused_clone_16(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 % 64
    x1 = xindex // 64 % 64
    x2 = xindex // 4096 % 64
    x3 = xindex // 262144
    x4 = xindex
    tmp0 = tl.load(in_ptr0 + (450151 + x0 + 120 * x1 + 14400 * x2 + 1728000 *
        x3), None)
    tl.store(out_ptr0 + x4, tmp0, None)


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, primals_34, primals_35, primals_36, primals_37,
        primals_38, primals_39, primals_40) = args
    args.clear()
    assert_size_stride(primals_1, (4, 1, 64, 64, 64), (262144, 262144, 4096,
        64, 1))
    assert_size_stride(primals_2, (8, 1, 3, 3, 3), (27, 27, 9, 3, 1))
    assert_size_stride(primals_3, (8,), (1,))
    assert_size_stride(primals_4, (8, 8, 3, 3, 3), (216, 27, 9, 3, 1))
    assert_size_stride(primals_5, (8,), (1,))
    assert_size_stride(primals_6, (16, 8, 3, 3, 3), (216, 27, 9, 3, 1))
    assert_size_stride(primals_7, (16,), (1,))
    assert_size_stride(primals_8, (16, 16, 3, 3, 3), (432, 27, 9, 3, 1))
    assert_size_stride(primals_9, (16,), (1,))
    assert_size_stride(primals_10, (32, 16, 3, 3, 3), (432, 27, 9, 3, 1))
    assert_size_stride(primals_11, (32,), (1,))
    assert_size_stride(primals_12, (32, 32, 3, 3, 3), (864, 27, 9, 3, 1))
    assert_size_stride(primals_13, (32,), (1,))
    assert_size_stride(primals_14, (32, 32, 3, 3, 3), (864, 27, 9, 3, 1))
    assert_size_stride(primals_15, (32,), (1,))
    assert_size_stride(primals_16, (64, 32, 3, 3, 3), (864, 27, 9, 3, 1))
    assert_size_stride(primals_17, (64,), (1,))
    assert_size_stride(primals_18, (64, 64, 3, 3, 3), (1728, 27, 9, 3, 1))
    assert_size_stride(primals_19, (64,), (1,))
    assert_size_stride(primals_20, (64, 64, 3, 3, 3), (1728, 27, 9, 3, 1))
    assert_size_stride(primals_21, (64,), (1,))
    assert_size_stride(primals_22, (64, 64, 3, 3, 3), (1728, 27, 9, 3, 1))
    assert_size_stride(primals_23, (64,), (1,))
    assert_size_stride(primals_24, (64, 64, 3, 3, 3), (1728, 27, 9, 3, 1))
    assert_size_stride(primals_25, (64,), (1,))
    assert_size_stride(primals_26, (64, 64, 3, 3, 3), (1728, 27, 9, 3, 1))
    assert_size_stride(primals_27, (64,), (1,))
    assert_size_stride(primals_28, (512, 64, 7, 7, 7), (21952, 343, 49, 7, 1))
    assert_size_stride(primals_29, (512,), (1,))
    assert_size_stride(primals_30, (512, 512, 1, 1, 1), (512, 1, 1, 1, 1))
    assert_size_stride(primals_31, (512,), (1,))
    assert_size_stride(primals_32, (1, 512, 1, 1, 1), (512, 1, 1, 1, 1))
    assert_size_stride(primals_33, (1,), (1,))
    assert_size_stride(primals_34, (1, 1, 4, 4, 4), (64, 64, 16, 4, 1))
    assert_size_stride(primals_35, (1, 64, 1, 1, 1), (64, 1, 1, 1, 1))
    assert_size_stride(primals_36, (1,), (1,))
    assert_size_stride(primals_37, (1, 1, 4, 4, 4), (64, 64, 16, 4, 1))
    assert_size_stride(primals_38, (1, 32, 1, 1, 1), (32, 1, 1, 1, 1))
    assert_size_stride(primals_39, (1,), (1,))
    assert_size_stride(primals_40, (1, 1, 16, 16, 16), (4096, 4096, 256, 16, 1)
        )
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0)
        buf0 = extern_kernels.convolution(primals_1, primals_2, stride=(1, 
            1, 1), padding=(60, 60, 60), dilation=(1, 1, 1), transposed=
            False, output_padding=(0, 0, 0), groups=1, bias=None)
        assert_size_stride(buf0, (4, 8, 182, 182, 182), (48228544, 6028568,
            33124, 182, 1))
        buf1 = buf0
        del buf0
        get_raw_stream(0)
        triton_poi_fused_convolution_relu_0[grid(192914176)](buf1,
            primals_3, 192914176, XBLOCK=512, num_warps=8, num_stages=1)
        del primals_3
        buf2 = extern_kernels.convolution(buf1, primals_4, stride=(1, 1, 1),
            padding=(1, 1, 1), dilation=(1, 1, 1), transposed=False,
            output_padding=(0, 0, 0), groups=1, bias=None)
        assert_size_stride(buf2, (4, 8, 182, 182, 182), (48228544, 6028568,
            33124, 182, 1))
        buf3 = empty_strided_cuda((4, 8, 182, 182, 182), (48269312, 6033664,
            33152, 182, 1), torch.float32)
        triton_poi_fused_convolution_relu_1[grid(192914176)](buf2,
            primals_5, buf3, 192914176, XBLOCK=512, num_warps=8, num_stages=1)
        del buf2
        del primals_5
        buf4 = torch.ops.aten.max_pool3d_with_indices.default(buf3, [2, 2, 
            2], [2, 2, 2], [0, 0, 0], [1, 1, 1], True)
        buf5 = buf4[0]
        buf6 = buf4[1]
        del buf4
        buf7 = extern_kernels.convolution(buf5, primals_6, stride=(1, 1, 1),
            padding=(15, 15, 15), dilation=(1, 1, 1), transposed=False,
            output_padding=(0, 0, 0), groups=1, bias=None)
        assert_size_stride(buf7, (4, 16, 119, 119, 119), (26962544, 1685159,
            14161, 119, 1))
        buf8 = buf7
        del buf7
        triton_poi_fused_convolution_relu_2[grid(107850176)](buf8,
            primals_7, 107850176, XBLOCK=512, num_warps=8, num_stages=1)
        del primals_7
        buf9 = extern_kernels.convolution(buf8, primals_8, stride=(1, 1, 1),
            padding=(1, 1, 1), dilation=(1, 1, 1), transposed=False,
            output_padding=(0, 0, 0), groups=1, bias=None)
        assert_size_stride(buf9, (4, 16, 119, 119, 119), (26962544, 1685159,
            14161, 119, 1))
        buf10 = empty_strided_cuda((4, 16, 119, 119, 119), (26991104, 
            1686944, 14176, 119, 1), torch.float32)
        triton_poi_fused_convolution_relu_3[grid(107850176)](buf9,
            primals_9, buf10, 107850176, XBLOCK=1024, num_warps=4, num_stages=1
            )
        del buf9
        del primals_9
        buf11 = torch.ops.aten.max_pool3d_with_indices.default(buf10, [2, 2,
            2], [2, 2, 2], [0, 0, 0], [1, 1, 1], True)
        buf12 = buf11[0]
        buf13 = buf11[1]
        del buf11
        buf14 = extern_kernels.convolution(buf12, primals_10, stride=(1, 1,
            1), padding=(1, 1, 1), dilation=(1, 1, 1), transposed=False,
            output_padding=(0, 0, 0), groups=1, bias=None)
        assert_size_stride(buf14, (4, 32, 60, 60, 60), (6912000, 216000, 
            3600, 60, 1))
        buf15 = buf14
        del buf14
        triton_poi_fused_convolution_relu_4[grid(27648000)](buf15,
            primals_11, 27648000, XBLOCK=512, num_warps=8, num_stages=1)
        del primals_11
        buf16 = extern_kernels.convolution(buf15, primals_12, stride=(1, 1,
            1), padding=(1, 1, 1), dilation=(1, 1, 1), transposed=False,
            output_padding=(0, 0, 0), groups=1, bias=None)
        assert_size_stride(buf16, (4, 32, 60, 60, 60), (6912000, 216000, 
            3600, 60, 1))
        buf17 = buf16
        del buf16
        triton_poi_fused_convolution_relu_4[grid(27648000)](buf17,
            primals_13, 27648000, XBLOCK=512, num_warps=8, num_stages=1)
        del primals_13
        buf18 = extern_kernels.convolution(buf17, primals_14, stride=(1, 1,
            1), padding=(1, 1, 1), dilation=(1, 1, 1), transposed=False,
            output_padding=(0, 0, 0), groups=1, bias=None)
        assert_size_stride(buf18, (4, 32, 60, 60, 60), (6912000, 216000, 
            3600, 60, 1))
        buf19 = empty_strided_cuda((4, 32, 60, 60, 60), (6942720, 216960, 
            3616, 60, 1), torch.float32)
        triton_poi_fused_convolution_relu_5[grid(27648000)](buf18,
            primals_15, buf19, 27648000, XBLOCK=512, num_warps=8, num_stages=1)
        del buf18
        del primals_15
        buf20 = torch.ops.aten.max_pool3d_with_indices.default(buf19, [2, 2,
            2], [2, 2, 2], [0, 0, 0], [1, 1, 1], True)
        buf21 = buf20[0]
        buf22 = buf20[1]
        del buf20
        buf23 = extern_kernels.convolution(buf21, primals_16, stride=(1, 1,
            1), padding=(1, 1, 1), dilation=(1, 1, 1), transposed=False,
            output_padding=(0, 0, 0), groups=1, bias=None)
        assert_size_stride(buf23, (4, 64, 30, 30, 30), (1728000, 27000, 900,
            30, 1))
        buf24 = buf23
        del buf23
        triton_poi_fused_convolution_relu_6[grid(6912000)](buf24,
            primals_17, 6912000, XBLOCK=512, num_warps=8, num_stages=1)
        del primals_17
        buf25 = extern_kernels.convolution(buf24, primals_18, stride=(1, 1,
            1), padding=(1, 1, 1), dilation=(1, 1, 1), transposed=False,
            output_padding=(0, 0, 0), groups=1, bias=None)
        assert_size_stride(buf25, (4, 64, 30, 30, 30), (1728000, 27000, 900,
            30, 1))
        buf26 = buf25
        del buf25
        triton_poi_fused_convolution_relu_6[grid(6912000)](buf26,
            primals_19, 6912000, XBLOCK=512, num_warps=8, num_stages=1)
        del primals_19
        buf27 = extern_kernels.convolution(buf26, primals_20, stride=(1, 1,
            1), padding=(1, 1, 1), dilation=(1, 1, 1), transposed=False,
            output_padding=(0, 0, 0), groups=1, bias=None)
        assert_size_stride(buf27, (4, 64, 30, 30, 30), (1728000, 27000, 900,
            30, 1))
        buf28 = empty_strided_cuda((4, 64, 30, 30, 30), (1728512, 27008, 
            900, 30, 1), torch.float32)
        triton_poi_fused_convolution_relu_7[grid(6912000)](buf27,
            primals_21, buf28, 6912000, XBLOCK=1024, num_warps=4, num_stages=1)
        del buf27
        del primals_21
        buf29 = torch.ops.aten.max_pool3d_with_indices.default(buf28, [2, 2,
            2], [2, 2, 2], [0, 0, 0], [1, 1, 1], True)
        buf30 = buf29[0]
        buf31 = buf29[1]
        del buf29
        buf32 = extern_kernels.convolution(buf30, primals_22, stride=(1, 1,
            1), padding=(1, 1, 1), dilation=(1, 1, 1), transposed=False,
            output_padding=(0, 0, 0), groups=1, bias=None)
        assert_size_stride(buf32, (4, 64, 15, 15, 15), (216000, 3375, 225, 
            15, 1))
        buf33 = buf32
        del buf32
        triton_poi_fused_convolution_relu_8[grid(864000)](buf33, primals_23,
            864000, XBLOCK=512, num_warps=8, num_stages=1)
        del primals_23
        buf34 = extern_kernels.convolution(buf33, primals_24, stride=(1, 1,
            1), padding=(1, 1, 1), dilation=(1, 1, 1), transposed=False,
            output_padding=(0, 0, 0), groups=1, bias=None)
        assert_size_stride(buf34, (4, 64, 15, 15, 15), (216000, 3375, 225, 
            15, 1))
        buf35 = buf34
        del buf34
        triton_poi_fused_convolution_relu_8[grid(864000)](buf35, primals_25,
            864000, XBLOCK=512, num_warps=8, num_stages=1)
        del primals_25
        buf36 = extern_kernels.convolution(buf35, primals_26, stride=(1, 1,
            1), padding=(1, 1, 1), dilation=(1, 1, 1), transposed=False,
            output_padding=(0, 0, 0), groups=1, bias=None)
        assert_size_stride(buf36, (4, 64, 15, 15, 15), (216000, 3375, 225, 
            15, 1))
        buf37 = empty_strided_cuda((4, 64, 15, 15, 15), (217088, 3392, 225,
            15, 1), torch.float32)
        triton_poi_fused_convolution_relu_9[grid(864000)](buf36, primals_27,
            buf37, 864000, XBLOCK=1024, num_warps=4, num_stages=1)
        del primals_27
        buf38 = torch.ops.aten.max_pool3d_with_indices.default(buf37, [2, 2,
            2], [2, 2, 2], [0, 0, 0], [1, 1, 1], True)
        buf39 = buf38[0]
        buf40 = buf38[1]
        del buf38
        buf41 = extern_kernels.convolution(buf39, primals_28, stride=(1, 1,
            1), padding=(0, 0, 0), dilation=(1, 1, 1), transposed=False,
            output_padding=(0, 0, 0), groups=1, bias=None)
        assert_size_stride(buf41, (4, 512, 2, 2, 2), (4096, 8, 4, 2, 1))
        buf42 = buf41
        del buf41
        triton_poi_fused_convolution_relu_10[grid(16384)](buf42, primals_29,
            16384, XBLOCK=256, num_warps=4, num_stages=1)
        del primals_29
        buf43 = extern_kernels.convolution(buf42, primals_30, stride=(1, 1,
            1), padding=(0, 0, 0), dilation=(1, 1, 1), transposed=False,
            output_padding=(0, 0, 0), groups=1, bias=None)
        assert_size_stride(buf43, (4, 512, 2, 2, 2), (4096, 8, 4, 2, 1))
        buf44 = buf43
        del buf43
        triton_poi_fused_convolution_relu_10[grid(16384)](buf44, primals_31,
            16384, XBLOCK=256, num_warps=4, num_stages=1)
        del primals_31
        buf45 = extern_kernels.convolution(buf44, primals_32, stride=(1, 1,
            1), padding=(0, 0, 0), dilation=(1, 1, 1), transposed=False,
            output_padding=(0, 0, 0), groups=1, bias=None)
        assert_size_stride(buf45, (4, 1, 2, 2, 2), (8, 8, 4, 2, 1))
        buf46 = buf45
        del buf45
        triton_poi_fused_convolution_11[grid(32)](buf46, primals_33, 32,
            XBLOCK=32, num_warps=1, num_stages=1)
        del primals_33
        buf47 = extern_kernels.convolution(buf46, primals_34, stride=(2, 2,
            2), padding=(0, 0, 0), dilation=(1, 1, 1), transposed=True,
            output_padding=(0, 0, 0), groups=1, bias=None)
        assert_size_stride(buf47, (4, 1, 6, 6, 6), (216, 216, 36, 6, 1))
        buf48 = buf36
        del buf36
        triton_poi_fused_mul_12[grid(864000)](buf30, buf48, 864000, XBLOCK=
            1024, num_warps=4, num_stages=1)
        buf49 = extern_kernels.convolution(buf48, primals_35, stride=(1, 1,
            1), padding=(0, 0, 0), dilation=(1, 1, 1), transposed=False,
            output_padding=(0, 0, 0), groups=1, bias=None)
        assert_size_stride(buf49, (4, 1, 15, 15, 15), (3375, 3375, 225, 15, 1))
        buf50 = buf47
        del buf47
        triton_poi_fused_add_13[grid(864)](buf50, buf49, primals_36, 864,
            XBLOCK=128, num_warps=4, num_stages=1)
        del buf49
        del primals_36
        buf51 = extern_kernels.convolution(buf50, primals_37, stride=(2, 2,
            2), padding=(0, 0, 0), dilation=(1, 1, 1), transposed=True,
            output_padding=(0, 0, 0), groups=1, bias=None)
        assert_size_stride(buf51, (4, 1, 14, 14, 14), (2744, 2744, 196, 14, 1))
        buf52 = empty_strided_cuda((4, 32, 30, 30, 30), (864000, 27000, 900,
            30, 1), torch.float32)
        triton_poi_fused_mul_14[grid(3456000)](buf21, buf52, 3456000,
            XBLOCK=512, num_warps=8, num_stages=1)
        buf53 = extern_kernels.convolution(buf52, primals_38, stride=(1, 1,
            1), padding=(0, 0, 0), dilation=(1, 1, 1), transposed=False,
            output_padding=(0, 0, 0), groups=1, bias=None)
        assert_size_stride(buf53, (4, 1, 30, 30, 30), (27000, 27000, 900, 
            30, 1))
        buf54 = buf51
        del buf51
        triton_poi_fused_add_15[grid(10976)](buf54, buf53, primals_39, 
            10976, XBLOCK=256, num_warps=4, num_stages=1)
        del buf53
        del primals_39
        buf55 = extern_kernels.convolution(buf54, primals_40, stride=(8, 8,
            8), padding=(0, 0, 0), dilation=(1, 1, 1), transposed=True,
            output_padding=(0, 0, 0), groups=1, bias=None)
        assert_size_stride(buf55, (4, 1, 120, 120, 120), (1728000, 1728000,
            14400, 120, 1))
        buf56 = empty_strided_cuda((4, 1, 64, 64, 64), (262144, 262144, 
            4096, 64, 1), torch.float32)
        triton_poi_fused_clone_16[grid(1048576)](buf55, buf56, 1048576,
            XBLOCK=512, num_warps=8, num_stages=1)
        del buf55
    return (buf56, primals_1, primals_2, primals_4, primals_6, primals_8,
        primals_10, primals_12, primals_14, primals_16, primals_18,
        primals_20, primals_22, primals_24, primals_26, primals_28,
        primals_30, primals_32, primals_34, primals_35, primals_37,
        primals_38, primals_40, buf1, buf3, buf5, buf6, buf8, buf10, buf12,
        buf13, buf15, buf17, buf19, buf21, buf22, buf24, buf26, buf28,
        buf30, buf31, buf33, buf35, buf37, buf39, buf40, buf42, buf44,
        buf46, buf48, buf50, buf52, buf54)


class FCN_NetNew(nn.Module):

    def __init__(self, in_channels=1, n_class=1):
        super().__init__()
        self.conv1_1 = nn.Conv3d(in_channels, 8, 3, padding=60)
        self.relu1_1 = nn.ReLU(inplace=True)
        self.conv1_2 = nn.Conv3d(8, 8, 3, padding=1)
        self.relu1_2 = nn.ReLU(inplace=True)
        self.pool1 = nn.MaxPool3d(2, stride=2, ceil_mode=True)
        self.conv2_1 = nn.Conv3d(8, 16, 3, padding=15)
        self.relu2_1 = nn.ReLU(inplace=True)
        self.conv2_2 = nn.Conv3d(16, 16, 3, padding=1)
        self.relu2_2 = nn.ReLU(inplace=True)
        self.pool2 = nn.MaxPool3d(2, stride=2, ceil_mode=True)
        self.conv3_1 = nn.Conv3d(16, 32, 3, padding=1)
        self.relu3_1 = nn.ReLU(inplace=True)
        self.conv3_2 = nn.Conv3d(32, 32, 3, padding=1)
        self.relu3_2 = nn.ReLU(inplace=True)
        self.conv3_3 = nn.Conv3d(32, 32, 3, padding=1)
        self.relu3_3 = nn.ReLU(inplace=True)
        self.pool3 = nn.MaxPool3d(2, stride=2, ceil_mode=True)
        self.conv4_1 = nn.Conv3d(32, 64, 3, padding=1)
        self.relu4_1 = nn.ReLU(inplace=True)
        self.conv4_2 = nn.Conv3d(64, 64, 3, padding=1)
        self.relu4_2 = nn.ReLU(inplace=True)
        self.conv4_3 = nn.Conv3d(64, 64, 3, padding=1)
        self.relu4_3 = nn.ReLU(inplace=True)
        self.pool4 = nn.MaxPool3d(2, stride=2, ceil_mode=True)
        self.conv5_1 = nn.Conv3d(64, 64, 3, padding=1)
        self.relu5_1 = nn.ReLU(inplace=True)
        self.conv5_2 = nn.Conv3d(64, 64, 3, padding=1)
        self.relu5_2 = nn.ReLU(inplace=True)
        self.conv5_3 = nn.Conv3d(64, 64, 3, padding=1)
        self.relu5_3 = nn.ReLU(inplace=True)
        self.pool5 = nn.MaxPool3d(2, stride=2, ceil_mode=True)
        self.fc6 = nn.Conv3d(64, 512, 7)
        self.relu6 = nn.ReLU(inplace=True)
        self.drop6 = nn.Dropout3d()
        self.fc7 = nn.Conv3d(512, 512, 1)
        self.relu7 = nn.ReLU(inplace=True)
        self.drop7 = nn.Dropout3d()
        self.score_fr = nn.Conv3d(512, n_class, 1)
        self.score_pool3 = nn.Conv3d(32, n_class, 1)
        self.score_pool4 = nn.Conv3d(64, n_class, 1)
        self.upscore2 = nn.ConvTranspose3d(n_class, n_class, 4, stride=2,
            bias=False)
        self.upscore8 = nn.ConvTranspose3d(n_class, n_class, 16, stride=8,
            bias=False)
        self.upscore_pool4 = nn.ConvTranspose3d(n_class, n_class, 4, stride
            =2, bias=False)
        self._initialize_weights()

    def get_upsampling_weight(self, in_channels, out_channels, kernel_size):
        """Make a 2D bilinear kernel suitable for upsampling"""
        factor = (kernel_size + 1) // 2
        if kernel_size % 2 == 1:
            center = factor - 1
        else:
            center = factor - 0.5
        og = np.ogrid[:kernel_size, :kernel_size, :kernel_size]
        filt = (1 - abs(og[0] - center) / factor) * (1 - abs(og[1] - center
            ) / factor)
        weight = np.zeros((in_channels, out_channels, kernel_size,
            kernel_size, kernel_size), dtype=np.float64)
        weight[range(in_channels), range(out_channels), :, :, :] = filt
        return torch.from_numpy(weight).float()

    def _initialize_weights(self):
        for m in self.modules():
            if isinstance(m, nn.Conv3d):
                m.weight.data.zero_()
                m.weight.data.normal_(0.0, 0.1)
                if m.bias is not None:
                    m.bias.data.zero_()
            if isinstance(m, nn.ConvTranspose3d):
                assert m.kernel_size[0] == m.kernel_size[1]
                initial_weight = self.get_upsampling_weight(m.in_channels,
                    m.out_channels, m.kernel_size[0])
                m.weight.data.copy_(initial_weight)

    def forward(self, input_0):
        primals_2 = self.conv1_1.weight
        primals_3 = self.conv1_1.bias
        primals_4 = self.conv1_2.weight
        primals_5 = self.conv1_2.bias
        primals_6 = self.conv2_1.weight
        primals_7 = self.conv2_1.bias
        primals_8 = self.conv2_2.weight
        primals_9 = self.conv2_2.bias
        primals_10 = self.conv3_1.weight
        primals_11 = self.conv3_1.bias
        primals_12 = self.conv3_2.weight
        primals_13 = self.conv3_2.bias
        primals_14 = self.conv3_3.weight
        primals_15 = self.conv3_3.bias
        primals_16 = self.conv4_1.weight
        primals_17 = self.conv4_1.bias
        primals_18 = self.conv4_2.weight
        primals_19 = self.conv4_2.bias
        primals_20 = self.conv4_3.weight
        primals_21 = self.conv4_3.bias
        primals_22 = self.conv5_1.weight
        primals_23 = self.conv5_1.bias
        primals_24 = self.conv5_2.weight
        primals_25 = self.conv5_2.bias
        primals_26 = self.conv5_3.weight
        primals_27 = self.conv5_3.bias
        primals_28 = self.fc6.weight
        primals_29 = self.fc6.bias
        primals_30 = self.fc7.weight
        primals_31 = self.fc7.bias
        primals_32 = self.score_fr.weight
        primals_33 = self.score_fr.bias
        primals_38 = self.score_pool3.weight
        primals_36 = self.score_pool3.bias
        primals_35 = self.score_pool4.weight
        primals_39 = self.score_pool4.bias
        primals_34 = self.upscore2.weight
        primals_40 = self.upscore8.weight
        primals_37 = self.upscore_pool4.weight
        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, primals_34,
            primals_35, primals_36, primals_37, primals_38, primals_39,
            primals_40])
        return output[0]


Measured latency_ms: 0.024688