# CUDA.jl write to global memory in PTX

**URL:** https://discourse.julialang.org/t/cuda-jl-write-to-global-memory-in-ptx/127426
**Category:** GPU
**Tags:** cuda, cudajl
**Created:** [March 27, 2025, 4:34pm UTC](https://discourse.julialang.org/t/cuda-jl-write-to-global-memory-in-ptx/127426 "2025-03-27T16:34:42Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![daniwipes](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/daniwipes/32/216008_2.png) [@daniwipes](https://discourse.julialang.org/u/daniwipes)
#### Post date: [March 27, 2025, 9:31pm UTC](https://discourse.julialang.org/t/cuda-jl-write-to-global-memory-in-ptx/127426/5 "2025-03-27T21:31:18Z")

</div>

Great thanks, now it worked!

Also other great news: With this I was able to fix my problem.

Here is the updated PTX-Code:

```julia
.version 8.5 // changed from 7.1 to 8.5
.target sm_61
.address_size 64

.visible .entry ExpressionProcessing(
.param .u64 param_1) // changed from .u32 to u.64
{
	.reg .b64 %parameter<1>; // changed from .u32 to .b64
	.reg .b64 %i<1>; // changed from .u32 to .b64

	ld.param.u64 %i0, [param_1]; // changed from .u32 to .b64
	cvta.to.global.u64 %parameter0, %i0; // changed from .u32 to .b64

	st.global.f32 [%parameter0], 10.0;
	ret;
}

```

With these changes I was also able to get my more complicated PTX code running again!

Thank you guys for helping me out!

---

_[View the full topic](https://discourse.julialang.org/t/cuda-jl-write-to-global-memory-in-ptx/127426)._
