- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
In SYCL/DPCPP, if the function `sycl::malloc_device` fails (because there is not enough memory available), it takes 20 seconds to return.
I created an example code (see below). There, I make two allocations. If the second allocation exceeds the total memory capacity, it takes 20 seconds to return (see sample outputs below) and returns a nullptr.
I am OK with it returning nullptr, that is reasonable, when there is not enough memory. **But why does it take so long?**
Almost exaclty 20 seconds. The amount of free/occupied/total memory capacity does not make any difference, using PVC1100 or PVC1550 makes no difference, using different intel toolkit versions (2024.0.2 -- 2025.0.0) makes no difference. Even the presence of `aspect::ext_intel_free_memory` makes no difference.
I was testing this with a PVC1550 on a Tiber devcloud instance, and with a PVC1100 on the training nodes in the Tiber devcloud.
What is going on? I would appreciate any help with this.
Jakub
--------
compile with: `icpx -fsycl -qopenmp source.cpp -o program.x`
run: `./program.x <GiB_first_alloc> <GiB_second_alloc>`
run: `./program.x 60 4`
example source code:
```
```
output from PVC1550 Tiber devcloud instance with intel toolkit 2025.0.0, using FLAT mode for the 2-stack gpu:
```
$ ./program.x 60 5
Device:
Name: Intel(R) Data Center GPU Max 1550
Platform: Intel(R) oneAPI Unified Runtime over Level-Zero
Global memory: 65536 MiB
Free memory aspect: NO
Allocating 61440 MiB
ptr1: 0xff00000000200000
time: 21.875 ms
Allocating 5120 MiB
ptr2: (nil)
time: 20050.431 ms
The end
```
(using COMPOSITE mode and running with `./program.x 120 10`, the second allocation still takes 20 seconds)
output from PVC1100 on the Tiber training nodes through jupyterlab, intel toolkit 2024.2.1:
```
$ ./program.x 45 5
Device:
Name: Intel(R) Data Center GPU Max 1100
Platform: Intel(R) Level-Zero
Global memory: 49152 MiB
Free memory aspect: YES
Allocating 46080 MiB
ptr1: 0xff00e00000200000
time: 0.219 ms
Allocating 5120 MiB
ptr2: (nil)
time: 20042.670 ms
The end
```
edit:
Link Copied
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page