Comments (6)
Can you reproduce the crash using CPU backend? Or it only happens with ROCM?
from pytorch.
Only on ROCM, it works as expected on CPU.
from pytorch.
what is the steps for us to reproduce? can you @Saratii list the steps of your installation and scripts that we can reproduce the issue?
from pytorch.
Tried to repo using steps in issue description as follows.
import pygame
import torch
from torch import nn
screen = pygame.display.set_mode((9, 9))
class BearBrain(nn.Module):
def __init__(self):
super().__init__()
brain = BearBrain()
optimizer = torch.optim.Adam([1], lr=1)
but got this error:
python issue129100.py
pygame 2.5.2 (SDL 2.28.2, Python 3.8.19)
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
File "issue129100.py", line 9, in <module>
optimizer = torch.optim.Adam([1], lr=1)
File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/optim/adam.py", line 73, in __init__
super().__init__(params, defaults)
File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/optim/optimizer.py", line 367, in __init__
self.add_param_group(cast(dict, param_group))
File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/_compile.py", line 31, in inner
return disable_fn(*args, **kwargs)
File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/_dynamo/eval_frame.py", line 601, in _fn
return fn(*args, **kwargs)
File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/optim/optimizer.py", line 1014, in add_param_group
raise TypeError(
TypeError: optimizer can only optimize Tensors, but one of the params is int
from pytorch.
I was on fedora linux when I did it. Also with a weird rocm version of torch.
from pytorch.
@Saratii We don't have fedora env, and I can not reproduce your problem, even trying to pass the "optimizer can only optimize Tensors, but one of the params is int" by changing the input to torch.optim.Adam([1], lr=1).
Also what do you mean "weird rocm version of torch" ?
Then, if it is helpful, can you push a docker image with fedora, so that we can reproduce it?
from pytorch.
Related Issues (20)
- Does it still make sense to prevent saving multiple tensors that have a shared storage but different dtypes? HOT 3
- Pytorch build fail with GCC 14.1.0 due to third_party/fbgemm/src/UtilsAvx512.cc:970:35: error: ‘r’ may be used uninitialized [-Werror=maybe-uninitialized]
- torch.compile can supports load_state_dict HOT 4
- Investigate torchaudio and torchvision for WinoArm64
- Cannot serialize NJTs using torch.save HOT 3
- A process got stuck in TCPStore::get HOT 3
- [custom_op] Better error message on unsupported Tuple types.
- [custom_op] Support default device types
- [custom_op] Add a `mutated_args="unknown"` flag
- Flaky Test Bot isn't considering a distributed test failure to be a test failure HOT 1
- Huge queue on Windows runner HOT 5
- Importing torch.utils.benchmark causes torch.distributed to "Duplicate GPU detected" HOT 2
- Support a more flexible way to mark all CI jobs in a similar category as unstable
- DISABLED trunk / win-vs2019-cpu-py3 HOT 2
- [custom_op] factory functions don't work
- DISABLED test_tracker_multi_group_eager (__main__.TestTrackerFullyShard1DTrainingCore) HOT 3
- [custom_op] Figure out what to do with random custom ops
- SymNode.__repr__ shouldn't be used for compilation output HOT 9
- [compilation error] PyTorch compilation failed on macOS HOT 2
- CUDASymmetricMemory requires pidfd_open and pidfd_getfd support HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytorch.