MI210 nodes: MIOpen SQLite “disk I/O error” across multiple PyTorch/ROCm setups
Hello,
I’ve been running into consistent issues when using MI210 nodes (devel, mi2101x, mi2104x). Even very small PyTorch programs fail with a MIOpen internal error, and this seems to happen across multiple environments and version combinations.
Running a simple convolution results in the following error. This happens immediately during a forward pass.
MIOpen Error: /longer_pathname_so_that_rpms_can_support_packaging_the_debug_info_for_all_os_profiles/src/rocm-libraries/projects/miopen/src/sqlite_db.cpp:227: Internal error while accessing SQLite database: disk I/O error
RuntimeError: miopenStatusInternalError
This is enough to trigger the issue:
import torch
if __name__ == "__main__":
device = "cuda"
conv_layer = torch.nn.Conv2d(
in_channels=3,
out_channels=16,
kernel_size=3,
stride=1,
padding=1
).to(device)
x = torch.randn(4, 3, 64, 64).to(device)
y = conv_layer(x)
print(y.shape)
linear_layer = torch.nn.Linear(in_features=100, out_features=100).to(device)
x = torch.randn(4, 100).to(device)
y = linear_layer(x)
print(y.shape)
I tested both my own virtual environments and pre-installed modules via module load across multiple configurations:
- Python 3.12.12 | torch 2.11.0+rocm7.2 | HIP 7.2.26015
- Python 3.12.12 | torch 2.8.0+rocm6.4 | HIP 6.4.43482-0f2d60242
- Python 3.12.12 | torch 2.7.1+rocm6.3 | HIP 6.3.42131-fa1d09cbd
- Python 3.9 | torch 2.8.0+rocm6.4 | HIP 6.4.43482-0f2d60242
- Python 3.9 | torch 2.5.1+rocm6.2 | HIP 6.2.41133-dd7f95766
Is there a recommended PyTorch/ROCm setup that is known to work reliably? btw disabling the MIOpen cache in ~/.bashrc didn't seem to work either and triggered another problem (tried that a while ago) so that's why I suspect it's mainly a version compatibility problem.
Thank you for the help!
Hi @AhmadArrabi,
I'm unable to reproduce the issue. Please see my test below. Are you using a venv? It's possible you have conflicting Python environments. Let me know what you think and we can go from there.
Thanks, Tom
## Grab `mi2104x` node in interactive Slurm job
[login]$ salloc -N 1 -p mi2104x -t 30
## Create a Python virtual environment
[k003-007]$ python3.12 -m venv --upgrade-deps venv
## Activate the venv
[k003-007]$ source ./venv/bin/activate
## Install ROCm-enabled PyTorch
(venv) [k003-007]$ pip3 install torch torchvision --index-url https://download.pytorch.org/whl/rocm7.2
## Show the reproducer
(venv) [k003-007]$ cat reproducer.py
cat reproducer.py
import torch
if __name__ == "__main__":
device = "cuda"
conv_layer = torch.nn.Conv2d(
in_channels=3,
out_channels=16,
kernel_size=3,
stride=1,
padding=1
).to(device)
x = torch.randn(4, 3, 64, 64).to(device)
y = conv_layer(x)
print(y.shape)
linear_layer = torch.nn.Linear(in_features=100, out_features=100).to(device)
x = torch.randn(4, 100).to(device)
y = linear_layer(x)
print(y.shape)
## Run the reproducer
(venv) [k003-007]$ python reproducer.py
torch.Size([4, 16, 64, 64])
torch.Size([4, 100])
Hi @tom-papatheodore
It seems to be working only on mi2104x I've just tried on mi2101x and devel and it's giving the same error.
Hi @AhmadArrabi,
Can you please try again on mi2101x and devel? The problem should now be resolved.
Thanks, Tom
Thanks @tom-papatheodore , it's working now 👍
Happy to hear. Thanks for letting us know. I'll go ahead and close this issue.