Getting error cudaErrorInvalidNormSetting with a float texture; why?

I’m setting up a float texture, and I get the above error when I create the texture object. I’ve set the channel to float4, so I’m not sure why specifying the normalization as float should cause trouble.
I’ve confirmed that my width is appropriately pitched; the texture dims are 4096 x 2048.

  cudaResourceDesc resDesc{};
  memset(&resDesc, 0, sizeof(resDesc));
  resDesc.resType = cudaResourceTypePitch2D;
  resDesc.res.pitch2D.devPtr = buf;
  resDesc.res.pitch2D.width = texture_dims.x;
  resDesc.res.pitch2D.height = texture_dims.y;
  resDesc.res.pitch2D.pitchInBytes = rowbytes;
  if (texture_is_16f)
    resDesc.res.pitch2D.desc = cudaCreateChannelDescHalf4();
    resDesc.res.pitch2D.desc = cudaCreateChannelDesc<float4>();

  cudaTextureDesc texDesc{};
  memset(&texDesc, 0, sizeof(texDesc));
  texDesc.readMode = cudaReadModeNormalizedFloat;
  texDesc.filterMode = cudaFilterModeLinear;
  texDesc.addressMode[0] = mirror_edges ? cudaAddressModeMirror : cudaAddressModeBorder;
  texDesc.addressMode[1] = mirror_edges ? cudaAddressModeMirror : cudaAddressModeBorder;
  texDesc.normalizedCoords = true;
  if (!mirror_edges)
    for (int i = 0; i < 4; i++) texDesc.borderColor[i] = 0;  // black

  status = cudaCreateTextureObject(&source_texture, &resDesc, &texDesc, nullptr);
  checkCudaErrors(status); // ERROR HERE: cudaErrorInvalidNormSetting 

I’m running CUDA 12.4 on Windows 11.

That is only applicable to textures whose element type is an integer type. See here:

Note that this applies only to 8-bit and 16-bit integer formats. 32-bit integer format would not be promoted, regardless of whether or not this cudaTextureDesc::readMode is set cudaReadModeNormalizedFloat is specified.

Understood. It seemed to me like that option ought to be accepted for floats as well, as a noop. I’ll remove it.

I think accepting it for a float base texture as a noop could be confusing. The option implies normalization, i.e. converting returned values to the range of 0…1. That doesn’t happen with floating point base textures, AFAIK. So if it were accepted as a noop, and someone got a return value outside the range, they might be confused.