https://github.com/tdavidcl/cu_intercept
https://github.com/tdavidcl/cu_intercept
cuda cuda-memory cuda-programming hook massif memory-tracking preload
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/tdavidcl/cu_intercept
- Owner: tdavidcl
- License: gpl-3.0
- Created: 2024-09-15T15:05:52.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-01T08:13:18.000Z (over 1 year ago)
- Last Synced: 2025-03-30T03:31:44.479Z (about 1 year ago)
- Topics: cuda, cuda-memory, cuda-programming, hook, massif, memory-tracking, preload
- Language: C++
- Homepage:
- Size: 51.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cu_intercept
A small preload utility to intercept CUDA memory managment.
---
## Compile
```
cmake -B build .
cd build
make
```
## Usage
```
LD_PRELOAD=
```
## Outputs
In the path where you are running the programm with the LD_PRELOAD you wil find files named `output..txt` where `` is replace by the pid of your programm.
They contain the amount of memory allocated by the programm at every time of allocations.
you can read them with python like so:
```py
import numpy as np
import matplotlib.pyplot as plt
out = np.loadtxt("output.324547.txt")
plt.plot(out[:,0],out[:,1])
plt.xlabel("time [s]")
plt.ylabel("memory [byte]")
plt.show()
```