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


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

torch::Tensor min_sub_cuda(torch::Tensor x, torch::Tensor constant);
"""

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

template <typename scalar_t>
__global__ void min_sub_kernel(
    const scalar_t* __restrict__ x,
    const scalar_t* __restrict__ constant,
    scalar_t* __restrict__ out,
    int64_t n
) {
    using acc_t = at::opmath_type<scalar_t>;
    const acc_t c = static_cast<acc_t>(constant[0]);

    const int64_t start =
        static_cast<int64_t>(blockIdx.x) * blockDim.x + threadIdx.x;
    const int64_t stride =
        static_cast<int64_t>(blockDim.x) * gridDim.x;

    for (int64_t i = start; i < n; i += stride) {
        const acc_t value = static_cast<acc_t>(x[i]);
        // Propagate NaNs, matching torch.minimum.
        const acc_t minimum =
            (value != value || value < c) ? value : c;
        out[i] = static_cast<scalar_t>(minimum - c);
    }
}

torch::Tensor min_sub_cuda(torch::Tensor x, torch::Tensor constant) {
    TORCH_CHECK(x.is_cuda() && constant.is_cuda(),
                "Expected CUDA tensors");
    TORCH_CHECK(x.device() == constant.device(),
                "Tensors must be on the same device");
    TORCH_CHECK(x.scalar_type() == constant.scalar_type(),
                "Tensors must have matching dtypes");
    TORCH_CHECK(x.is_contiguous(), "Expected contiguous input");
    TORCH_CHECK(constant.numel() == 1, "Expected a scalar constant");

    const c10::cuda::CUDAGuard device_guard(x.device());
    auto out = torch::empty_like(x);
    const int64_t n = x.numel();
    if (n == 0) {
        return out;
    }

    constexpr int threads = 256;
    const int blocks = static_cast<int>(
        std::min<int64_t>((n + threads - 1) / threads, 4096));
    const auto stream = at::cuda::getCurrentCUDAStream();

    AT_DISPATCH_FLOATING_TYPES_AND2(
        at::ScalarType::Half,
        at::ScalarType::BFloat16,
        x.scalar_type(),
        "min_sub_cuda",
        [&] {
            min_sub_kernel<scalar_t><<<blocks, threads, 0, stream>>>(
                x.data_ptr<scalar_t>(),
                constant.data_ptr<scalar_t>(),
                out.data_ptr<scalar_t>(),
                n);
        });

    C10_CUDA_KERNEL_LAUNCH_CHECK();
    return out;
}
"""

_fused_ops = load_inline(
    name="fused_linear_min_sub_ops",
    cpp_sources=_cpp_source,
    cuda_sources=_cuda_source,
    functions=["min_sub_cuda"],
    extra_cflags=["-O3"],
    extra_cuda_cflags=["-O3"],
    verbose=False,
)


class ModelNew(nn.Module):
    def __init__(self, in_features, out_features, constant):
        super().__init__()
        self.linear = nn.Linear(in_features, out_features)
        self.constant = nn.Parameter(torch.tensor(constant))

    def forward(self, x):
        x = F.linear(x, self.linear.weight, self.linear.bias)
        constant = self.constant.to(device=x.device, dtype=x.dtype)
        return _fused_ops.min_sub_cuda(x, constant)
```