```python
import torch
import torch.nn as nn
from torch.utils.cpp_extension import load_inline


_cpp_source = """
#include <torch/extension.h>

torch::Tensor pooled_transpose_cuda(
    torch::Tensor x,
    torch::Tensor weight,
    torch::Tensor conv_bias,
    torch::Tensor bias);
"""

_cuda_source = r"""
#include <torch/extension.h>
#include <ATen/cuda/CUDAContext.h>
#include <c10/cuda/CUDAGuard.h>
#include <c10/cuda/CUDAException.h>
#include <cuda.h>
#include <cuda_runtime.h>
#include <stdint.h>

constexpr int THREADS = 256;
constexpr int TILE = 4096;

__device__ __forceinline__ float block_sum(float value) {
    __shared__ float scratch[8];
    const int lane = threadIdx.x & 31;
    const int warp = threadIdx.x >> 5;

    #pragma unroll
    for (int offset = 16; offset > 0; offset >>= 1)
        value += __shfl_down_sync(0xffffffff, value, offset);

    if (lane == 0)
        scratch[warp] = value;
    __syncthreads();

    if (warp == 0) {
        value = lane < 8 ? scratch[lane] : 0.0f;
        #pragma unroll
        for (int offset = 16; offset > 0; offset >>= 1)
            value += __shfl_down_sync(0xffffffff, value, offset);
        if (lane == 0)
            scratch[0] = value;
    }
    __syncthreads();
    return scratch[0];
}

__device__ __forceinline__ float block_max(float value) {
    __shared__ float scratch[8];
    const int lane = threadIdx.x & 31;
    const int warp = threadIdx.x >> 5;

    #pragma unroll
    for (int offset = 16; offset > 0; offset >>= 1)
        value = fmaxf(
            value, __shfl_down_sync(0xffffffff, value, offset));

    if (lane == 0)
        scratch[warp] = value;
    __syncthreads();

    if (warp == 0) {
        value = lane < 8 ? scratch[lane] : -CUDART_INF_F;
        #pragma unroll
        for (int offset = 16; offset > 0; offset >>= 1)
            value = fmaxf(
                value, __shfl_down_sync(0xffffffff, value, offset));
        if (lane == 0)
            scratch[0] = value;
    }
    __syncthreads();
    return scratch[0];
}

template<bool VECTORIZED>
__global__ void input_partial_sum(
    const float* __restrict__ x,
    float* __restrict__ partial,
    int64_t spatial,
    int parts)
{
    const int plane = blockIdx.y;
    const int tile = blockIdx.x;
    const int64_t start = int64_t(tile) * TILE;
    const float* input = x + int64_t(plane) * spatial;
    float value = 0.0f;

    if (VECTORIZED) {
        const float4* input4 = reinterpret_cast<const float4*>(input);
        const int64_t first = start / 4;
        const int64_t end = min(
            (start + TILE) / 4, spatial / 4);
        for (int64_t i = first + threadIdx.x; i < end; i += THREADS) {
            const float4 v = input4[i];
            value += (v.x + v.y) + (v.z + v.w);
        }
    } else {
        const int64_t end = min(start + TILE, spatial);
        for (int64_t i = start + threadIdx.x; i < end; i += THREADS)
            value += input[i];
    }

    value = block_sum(value);
    if (threadIdx.x == 0)
        partial[int64_t(plane) * parts + tile] = value;
}

__global__ void finish_input_sum(
    const float* __restrict__ partial,
    float* __restrict__ scaled_sum,
    int parts,
    float inverse_output_area)
{
    const int plane = blockIdx.x;
    float value = 0.0f;
    for (int i = threadIdx.x; i < parts; i += THREADS)
        value += partial[int64_t(plane) * parts + i];

    value = block_sum(value);
    if (threadIdx.x == 0)
        scaled_sum[plane] = value * inverse_output_area;
}

__global__ void fused_output(
    const float* __restrict__ scaled_sum,
    const float* __restrict__ weight,
    const float* __restrict__ conv_bias,
    const float* __restrict__ bias,
    float* __restrict__ output,
    int in_channels,
    int out_channels,
    int kernel_area)
{
    const int batch = blockIdx.x;
    const float* input = scaled_sum + int64_t(batch) * in_channels;

    float local_max = -CUDART_INF_F;
    float local_sum = 0.0f;

    for (int oc = threadIdx.x; oc < out_channels; oc += THREADS) {
        float value = 0.0f;
        for (int ic = 0; ic < in_channels; ++ic) {
            const float* w = weight
                + (int64_t(ic) * out_channels + oc) * kernel_area;
            float weight_sum = 0.0f;
            for (int k = 0; k < kernel_area; ++k)
                weight_sum += w[k];
            value = fmaf(input[ic], weight_sum, value);
        }

        value += conv_bias[oc];
        value += bias[oc];

        const float next_max = fmaxf(local_max, value);
        local_sum = local_sum * expf(local_max - next_max)
                  + expf(value - next_max);
        local_max = next_max;
    }

    const float maximum = block_max(local_max);
    const float contribution =
        local_sum * expf(local_max - maximum);
    const float total = block_sum(contribution);

    if (threadIdx.x == 0)
        output[batch] = (maximum + logf(total)) * 10.0f;
}

torch::Tensor pooled_transpose_cuda(
    torch::Tensor x,
    torch::Tensor weight,
    torch::Tensor conv_bias,
    torch::Tensor bias)
{
    TORCH_CHECK(x.is_cuda() && weight.is_cuda() &&
                conv_bias.is_cuda() && bias.is_cuda(),
                "All tensors must be CUDA tensors");
    TORCH_CHECK(x.scalar_type() == at::kFloat &&
                weight.scalar_type() == at::kFloat &&
                conv_bias.scalar_type() == at::kFloat &&
                bias.scalar_type() == at::kFloat,
                "All tensors must have dtype float32");
    TORCH_CHECK(x.is_contiguous() && weight.is_contiguous() &&
                conv_bias.is_contiguous() && bias.is_contiguous(),
                "All tensors must be contiguous");
    TORCH_CHECK(x.device() == weight.device() &&
                x.device() == conv_bias.device() &&
                x.device() == bias.device(),
                "All tensors must be on the same device");

    const c10::cuda::CUDAGuard guard(x.device());

    const int batch = x.size(0);
    const int in_channels = x.size(1);
    const int out_channels = weight.size(1);
    const int64_t spatial = x.size(2) * x.size(3);
    const int kh = weight.size(2);
    const int kw = weight.size(3);
    const int64_t output_area =
        (x.size(2) + kh - 1) * (x.size(3) + kw - 1);
    const int parts = (spatial + TILE - 1) / TILE;

    auto output = torch::empty({batch, 1}, x.options());
    if (batch == 0)
        return output;

    auto partial = torch::empty(
        {batch, in_channels, parts}, x.options());
    auto scaled_sum = torch::empty(
        {batch, in_channels}, x.options());

    const auto stream = at::cuda::getCurrentCUDAStream();
    const dim3 grid(parts, batch * in_channels);

    if (spatial % 4 == 0) {
        input_partial_sum<true><<<grid, THREADS, 0, stream>>>(
            x.data_ptr<float>(), partial.data_ptr<float>(),
            spatial, parts);
    } else {
        input_partial_sum<false><<<grid, THREADS, 0, stream>>>(
            x.data_ptr<float>(), partial.data_ptr<float>(),
            spatial, parts);
    }
    C10_CUDA_KERNEL_LAUNCH_CHECK();

    finish_input_sum<<<batch * in_channels, THREADS, 0, stream>>>(
        partial.data_ptr<float>(), scaled_sum.data_ptr<float>(),
        parts, 1.0f / static_cast<float>(output_area));
    C10_CUDA_KERNEL_LAUNCH_CHECK();

    fused_output<<<batch, THREADS, 0, stream>>>(
        scaled_sum.data_ptr<float>(), weight.data_ptr<float>(),
        conv_bias.data_ptr<float>(), bias.data_ptr<float>(),
        output.data_ptr<float>(),
        in_channels, out_channels, kh * kw);
    C10_CUDA_KERNEL_LAUNCH_CHECK();

    return output;
}
"""

_ops = load_inline(
    name="pooled_transpose_lse_cuda_v1",
    cpp_sources=_cpp_source,
    cuda_sources=_cuda_source,
    functions=["pooled_transpose_cuda"],
    extra_cflags=["-O3"],
    extra_cuda_cflags=["-O3"],
    verbose=False,
)


class ModelNew(nn.Module):
    def __init__(self, in_channels, out_channels, kernel_size, bias_shape):
        super().__init__()
        self.conv_transpose = nn.ConvTranspose2d(
            in_channels, out_channels, kernel_size
        )
        self.bias = nn.Parameter(torch.randn(bias_shape))

    def forward(self, x):
        conv = self.conv_transpose
        supported = (
            x.is_cuda
            and x.dtype == torch.float32
            and conv.weight.dtype == torch.float32
            and self.bias.dtype == torch.float32
            and x.ndim == 4
            and x.shape[1] == conv.in_channels
            and x.shape[2] > 0
            and x.shape[3] > 0
            and x.shape[0] * x.shape[1] <= 65535
            and tuple(self.bias.shape) == (conv.out_channels, 1, 1)
            and conv.groups == 1
            and conv.stride == (1, 1)
            and conv.padding == (0, 0)
            and conv.output_padding == (0, 0)
            and conv.dilation == (1, 1)
            and conv.bias is not None
            and conv.bias.dtype == torch.float32
        )

        if supported:
            # Summing the full transposed convolution equals the sum of
            # each input channel times the spatial sum of its filters.
            return _ops.pooled_transpose_cuda(
                x.contiguous(),
                conv.weight.contiguous(),
                conv.bias.contiguous(),
                self.bias.contiguous(),
            )

        x = conv(x)
        x = x.mean(dim=(2, 3), keepdim=True)
        x = x + self.bias
        x = torch.logsumexp(x, dim=1, keepdim=True)
        return x.sum(dim=(2, 3)) * 10.0
```