Comments (5)
Your torch default device needs to be the very first call. Not after all the other model setup has occurred. Or you can use with torch.device("cuda") before all your code.
from matgl.
I should add that you should post such questions on the Discussions section, not in as an Issue in GitHub. Issues are meant for actual bug reports.
from matgl.
from matgl.
Are you able to solve this problem? Please let me know.
I have tried like below declaring CUDA in the beginning still the error persists...
'''
if torch.cuda.is_available():
device = 'cuda'
else:
device = 'cpu'
print(f'The available device is {device}')
'''
from matgl.
Hi, @SmallBearC @chiku-parida, Are you able to solve this problem ? I also get the same errors.
from matgl.
Related Issues (20)
- [Bug]: Multi-GPU Training not Working in 0.7.1 and 0.8.5 HOT 3
- Periodic Boundaries not recognized during molecular dynamics simulation HOT 2
- Issues with training M3GNet potential on GPUs. HOT 2
- [Feature Request]: Relaxation under pressure HOT 1
- [Bug]: Data type for ASE potential energy result is not a float
- matgl - now available on conda-forge HOT 1
- [Bug]: Retrained M3Gnet potential cannot be used HOT 1
- [Feature Request]: Larger than memory datasets. HOT 3
- [Bug]: Not all data is on the same device HOT 1
- Missing 'bond type' attribute HOT 1
- How to use the potential of a finetuned model. HOT 1
- [Feature Request]: Implementation of other thermostats for molecular dynamics using matgl HOT 1
- what are the outputted units for stress? HOT 2
- Does the example training script work for multi-gpu training? HOT 1
- [Bug]: RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! HOT 5
- TensorNet HOT 1
- [Bug]: `RuntimeError: expected scalar type Float but found Double` HOT 1
- [Bug]: Cannot load from checkpoint HOT 2
- [Bug]: pymatgen CI broken due to transitive `pydantic` dependency via `matgl->dgl->pydantic`.
- [Bug]: Incompataibility with `dgl==2.1.0` and `torch==2.2.2` HOT 11
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 matgl.