Comments (7)
When you have a program compiled with cnn, and assuming that you call cnn's Initialize() function using the command line arguments passed in to the program, it's as simple as adding:
$ my_program --cnn-mem 1024 [other options]
to your command line arguments. Note that the cnn arguments must come before any other arguments.
These command line arguments should be documented, so I'll leave this issue open and add this to the documentation when I have a chance.
from dynet.
A small addition to this: we observe that setting --cnn-mem to values above 2010 or so always fail. Probably relates to some limits on contiguous memory allocation.
from dynet.
@yoavg @neubig it seems the current master has an integer overflow problem on the devices.cc when allocating memory. See this bug fixed in v2 (https://github.com/clab/cnn/blob/v2/cnn/devices.cc#L63) but not sure when will it be merged into master.
from dynet.
Thanks! is v2 operational already?
from dynet.
Yes, it's basically operational. I've switched my experiments over to v2. There are still a few things that need to be done, but I think we'll be merging it into master sooner rather than later.
from dynet.
Information about command line options has been added to README.md (in the v2 branch)
from dynet.
It seems to be the case that the order of the cnn args also matters. I'm using v2 and seeing that the --cnn-mem arg is ignored unless preceded by cnn-gpus or cnn-gpu-ids (will use 512 default) and those two args will fail if they follow cnn-mem. Can see with the xor example:
./examples/xor --cnn-mem 1024
[cnn] allocating memory: 512MB
./examples/xor --cnn-mem 1024 --cnn-gpu-ids 3
[cnn] Device(s) selected: 2
[cnn] Bad command line argument: --cnn-gpu-ids
Aborted (core dumped)
./examples/xor --cnn-gpu-ids 3 --cnn-mem 1024
[cnn] allocating memory: 1024MB
./examples/xor --cnn-gpus 1 --cnn-mem 1024
[cnn] allocating memory: 1024MB
from dynet.
Related Issues (20)
- When using mini-batch, there is a potential risk of future information leakage
- error: Could not download Eigen from 'https://bitbucket.org/eigen/eigen/get/2355b229ea4c.zip' HOT 2
- How does it run on an M1 Mac? HOT 1
- Trying to reuse LSTM weights in Keras from a model built in DyNet HOT 1
- Variable sized inputs
- Add support to release Linux aarch64 wheels
- Compatible versions of Eigen and Dynet for Cuda 11.1 HOT 6
- Cannot pip install dynet. Help!
- does DyNet help in rewiring analysis?
- Unable to build wheel for dynet installation (python 3.9)
- Unable to build wheel for dynet on Windows (pip install dynet) HOT 3
- Dynet GPU installation failure on Amazon Linux instances
- make: *** No targets specified and no makefile found.
- while releasing: ValueError: underlying buffer has been detached
- error: [Errno 2] No such file or directory: 'LICENSE.txt' HOT 4
- Inconsistencies between hand-calculated gradients and machine-calculated
- Is dynet supported anymore? Should users move to an alternative? HOT 1
- ARM dev board
- Cannot install Dynet Python bindings on Python 3.10 and 3.11 HOT 1
- make: *** No targets specified and no makefile found. Stop.
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 dynet.