# How to get the device name and the number of Compute units when using oneAPI.jl or AMDGPU.jl?

**URL:** https://discourse.julialang.org/t/how-to-get-the-device-name-and-the-number-of-compute-units-when-using-oneapi-jl-or-amdgpu-jl/128361
**Category:** Performance
**Tags:** oneapi
**Created:** [April 24, 2025, 11:39am UTC](https://discourse.julialang.org/t/how-to-get-the-device-name-and-the-number-of-compute-units-when-using-oneapi-jl-or-amdgpu-jl/128361 "2025-04-24T11:39:16Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![bpsomu](https://avatars.discourse-cdn.com/v4/letter/b/ee7513/32.png) [@bpsomu](https://discourse.julialang.org/u/bpsomu)
#### Post date: [April 24, 2025, 11:39am UTC](https://discourse.julialang.org/t/how-to-get-the-device-name-and-the-number-of-compute-units-when-using-oneapi-jl-or-amdgpu-jl/128361/1 "2025-04-24T11:39:16Z")

</div>

I am working on making a GPU vendor agnostic code with KerneAbstractions.jl. I am getting the device name with  
`device = CUDA.device()`  
and getting the number of Streaming Multiprocessors with  
`sm_count = CUDA.attribute(device, CUDA.DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT)`.

I was able to find it’s equivalent for AMD GPUs with  
`device = AMDGPU.device()`  
This works.

`compute_units = AMDGPU.compute_units(device)`  
This one does not work, what is the right command?

How do I do the same with Intel using oneAPI.jl?

---

<div class="post-metadata">

### Author: ![raman\_kumar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raman_kumar/32/26782_2.png) [@raman\_kumar](https://discourse.julialang.org/u/raman_kumar)
#### Post date: [January 18, 2026, 5:31pm UTC](https://discourse.julialang.org/t/how-to-get-the-device-name-and-the-number-of-compute-units-when-using-oneapi-jl-or-amdgpu-jl/128361/2 "2026-01-18T17:31:01Z")

</div>

I am also looking for the functions to find out maximum possible number for configuration arguments like the number of items (threads) and groups (blocks) in oneAPI.jl.

> **[The @oneapi Macro - Kernel Programming · oneAPI.jl](https://juliagpu.github.io/oneAPI.jl/dev/kernels/#The-%40oneapi-Macro)**
>
> For maximum performance or custom operations not covered by high-level array abstractions, you can write custom kernels in Julia that execute on the GPU. | Documentation for oneAPI.jl.

Devices and drivers name can be obtained by:

```julia-auto
julia> using oneAPI

julia> drivers()
ZeDriver iterator for 1 drivers:
1. ZeDriver(00000000-0000-0000-188b-ddfc01038caf): version 1.3.36015

julia> devices()
ZeDevice iterator for 1 devices:
1. Intel(R) Graphics

julia> device!(1) # Select the first available device
ZeDevice(GPU, vendor 0x8086, device 0x7d45): Intel(R) Graphics

```
