# CuTextureArray for Float64?

**URL:** <https://discourse.julialang.org/t/cutexturearray-for-float64/63346>\
**Category:** General Usage\
**Created:** [June 22, 2021, 4:00am UTC](https://discourse.julialang.org/t/cutexturearray-for-float64/63346 "2021-06-22T04:00:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wsshin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wsshin/32/360_2.png) [@wsshin](https://discourse.julialang.org/u/wsshin)\
**Post date:** [June 22, 2021, 4:00am UTC](https://discourse.julialang.org/t/cutexturearray-for-float64/63346/1 "2021-06-22T04:00:03Z")

</div>

I am trying to test the GPU interpolation example shown in [this blog posting](https://juliagpu.org/post/2020-10-30-cuda_2.1/index.html). I get an error when I try to create `CuTextureArray` from `CuArray{Float64}`. For example,

```julia
(@v1.6) pkg> st CUDA
      Status `~/.julia/environments/v1.6/Project.toml`
  [052768ef] CUDA v3.3.0

julia> using CUDA

julia> x = rand(2^10);

julia> cx = CuArray(x);
┌ Warning: The NVIDIA driver on this system only supports up to CUDA 11.1.0.
│ For performance reasons, it is recommended to upgrade to a driver that supports CUDA 11.2 or higher.
└ @ CUDA C:\Users\wo28768\.julia\packages\CUDA\mVgLI\src\initialization.jl:42
  Downloaded artifact: CUDA

julia> cx2 = CuTextureArray(cx);
ERROR: ArgumentError: CUDA does not support texture arrays for element type Float64.

```

Does this mean `CUDA.jl` does not support `CuTextureArray{Float64}` at all, or the error is due to the limitation of my GPU?

---

<div class="post-metadata">

**Author:** ![maleadt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/maleadt/32/10097_2.png) [@maleadt](https://discourse.julialang.org/u/maleadt)\
**Post date:** [June 22, 2021, 5:46am UTC](https://discourse.julialang.org/t/cutexturearray-for-float64/63346/2 "2021-06-22T05:46:21Z")

</div>

CUDA doesn’t support it:

> - The type of a texel, which is restricted to the basic integer and single-precision floating-point types and any of the 1-, 2-, and 4-component vector types defined in [Built-in Vector Types](https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#built-in-vector-types) that are derived from the basic integer and single-precision floating-point types.

---

<div class="post-metadata">

**Author:** ![wsshin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wsshin/32/360_2.png) [@wsshin](https://discourse.julialang.org/u/wsshin)\
**Post date:** [June 22, 2021, 1:04pm UTC](https://discourse.julialang.org/t/cutexturearray-for-float64/63346/3 "2021-06-22T13:04:21Z")

</div>

@maleadt, thanks for the confirmation. For others, the quoted text in @maleadt’s reply is from [Programming Guide :: CUDA Toolkit Documentation](https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#texture-memory).
