# Method Invalidations with CxxWrap + CUDA

**URL:** <https://discourse.julialang.org/t/method-invalidations-with-cxxwrap-cuda/140011>\
**Category:** General Usage\
**Created:** [October 14, 2026, 1:16am UTC](https://discourse.julialang.org/t/method-invalidations-with-cxxwrap-cuda/140011 "2026-10-14T01:16:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ejmeitz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ejmeitz/32/45283_2.png) [@ejmeitz](https://discourse.julialang.org/u/ejmeitz)\
**Post date:** [October 14, 2026, 1:16am UTC](https://discourse.julialang.org/t/method-invalidations-with-cxxwrap-cuda/140011/1 "2026-10-14T01:16:14Z")

</div>

Hello,

My package has several thousand method invalidations, which results in huge overheads using my library. I was able to remove ~1000 invalidations by fixing methods that I owned. However, CxxWrap seems to invalidate about 2000 methods when used in combination with CUDA. I tried something like this

```julia
module Test
using PrecompileTools

@recompile_invalidations begin
    using CUDA
    using CxxWrap
end
end

```

but it results in this error. Any help would be great!

```julia-auto
error: <inline asm>:1:2: invalid instruction mnemonic 'exit'
        exit;
        ^~~~

  1 dependency had output during precompilation:
┌ CxxRepair
│ [Output was shown above]
└
ERROR: LoadError: The following 1 package failed to precompile:

CxxRepair
Failed to precompile CxxRepair [60ba07c2-47f4-4b10-a727-224a08caf254] to "/pool/emeitz/.julia/compiled/v1.13/CxxRepair/jl_T35MSz" (ProcessSignaled(11)).

in expression starting at /pool/emeitz/fusion-startup-20261013/profiling/fusion-startup/healing_worker.jl:8

```

Some extra info. This is the dominant part of the SnoopCompile report confirming CxxWrap as the culprit.

 ![image](https://global.discourse-cdn.com/julialang/original/3X/3/5/3573a27254daeceadc55b39326f70d24470b0a66.png)
