# Problems with LinearAlgebra functions within KernelAbstractions and CUDA

**URL:** https://discourse.julialang.org/t/problems-with-linearalgebra-functions-within-kernelabstractions-and-cuda/97566
**Category:** General Usage
**Tags:** cuda, linearalgebra, kernelabstractions
**Created:** [April 17, 2023, 9:01am UTC](https://discourse.julialang.org/t/problems-with-linearalgebra-functions-within-kernelabstractions-and-cuda/97566 "2023-04-17T09:01:27Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![trahflow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/trahflow/32/30585_2.png) [@trahflow](https://discourse.julialang.org/u/trahflow)
#### Post date: [February 7, 2024, 3:37pm UTC](https://discourse.julialang.org/t/problems-with-linearalgebra-functions-within-kernelabstractions-and-cuda/97566/6 "2024-02-07T15:37:55Z")

</div>

> [@maleadt](#):
>
> That `@noinline` function should probably have a type signature that forces specialization, in order to make the code GPU compatible. Maybe open an issue on [StaticArraytsl.jl](https://juliahub.com/ui/Packages/StaticArraytsl)?

if I force specialization of the function `StaticArrays.dimension_mismatch_fail` on a local checkout ouf `StaticArrays`, I just get another error:

```julia
Reason: unsupported dynamic function invocation (call to print_to_string(xs...) @ Base strings/io.jl:137)
Stacktrace:
 [1] string
   @ ./strings/io.jl:189
 [2] dimension_mismatch_fail
   @ ~/julia-depots/gpu/dev/StaticArrays/src/convert.jl:196
 [3] convert
   @ ~/julia-depots/gpu/dev/StaticArrays/src/convert.jl:201
 [4] StaticArray
   @ ~/julia-depots/gpu/dev/StaticArrays/src/convert.jl:174
 [5] macro expansion
   @ ~/.julia/dev/DiffPointRasterisation/experiments/kernelabstractions.jl:13
 [6] gpu_kern
   @ ~/julia-depots/gpu/packages/KernelAbstractions/jmHRX/src/macros.jl:101
 [7] gpu_kern
   @ ./none:0

```

---

_[View the full topic](https://discourse.julialang.org/t/problems-with-linearalgebra-functions-within-kernelabstractions-and-cuda/97566)._
