# I get a warning when i use Upsample layer with AMDGPU

**URL:** <https://discourse.julialang.org/t/i-get-a-warning-when-i-use-upsample-layer-with-amdgpu/112728>\
**Category:** GPU\
**Created:** [April 9, 2024, 1:37pm UTC](https://discourse.julialang.org/t/i-get-a-warning-when-i-use-upsample-layer-with-amdgpu/112728 "2024-04-09T13:37:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Radu\_Mihai\_Diaconu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/radu_mihai_diaconu/32/45306_2.png) [@Radu\_Mihai\_Diaconu](https://discourse.julialang.org/u/Radu_Mihai_Diaconu)\
**Post date:** [April 9, 2024, 1:37pm UTC](https://discourse.julialang.org/t/i-get-a-warning-when-i-use-upsample-layer-with-amdgpu/112728/1 "2024-04-09T13:37:26Z")

</div>

Hello guys

so i have this code

```julia
using Flux: Upsample noise = 0.5f0 + 0.001f0 .+ AMDGPU.randn(Float32, 32, 32, 1, 1) 
layer1 = Upsample(:bilinear, size=(64, 64, 1, 1)) |> gpu 
layer1(noise)

```

any reason for me getting this?

```julia
┌ Warning: Global hostcalls detected: [:malloc_hostcall].
│ Use `AMDGPU.synchronize(; stop_hostcalls=false)` to synchronize and stop them.
│ Otherwise, performance might degrade if they keep running in the background.
└ @ AMDGPU.Compiler ~/.julia/packages/AMDGPU/uAYeb/src/compiler/codegen.jl:186
64×64×1×1 ROCArray{Float32, 4, AMDGPU.Runtime.Mem.HIPBuffer}:

```

i use ubuntu and rocm 6.0.2. i dont know how to fix it. from what i understood it may be an issue in NNlib side

---

<div class="post-metadata">

**Author:** ![Alexander-Barth](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alexander-barth/32/3692_2.png) [@Alexander-Barth](https://discourse.julialang.org/u/Alexander-Barth)\
**Post date:** [February 18, 2025, 11:00am UTC](https://discourse.julialang.org/t/i-get-a-warning-when-i-use-upsample-layer-with-amdgpu/112728/2 "2025-02-18T11:00:35Z")

</div>

I am having the same error message, but your error appears to be fixed :-):

```julia
using AMDGPU, Flux
noise = 0.5f0 + 0.001f0 .+ AMDGPU.randn(Float32, 32, 32, 1, 1) 
layer1 = Flux.Upsample(:bilinear, size=(64, 64)) |> gpu 
layer1(noise) |> size
# (64, 64, 1, 1)

```
