CUDA_LAUNCH_BLOCKING Environment variable?

7 085 vues
Accéder directement au premier message non lu

Samuel Leeman-Munk

non lue,
26 oct. 2015, 11:06:2426/10/2015
à theano-users
So far I've been pretty effectively avoiding having to change my environment variables very frequently. It's too easy to forget them and have unexpected behavior, so I use the code itself as much as possible and .theanorc at other times.
This CUDA_LAUNCH_BLOCKING that I have to use to profile on the GPU is apparently only available in an environment variable? Has anyone been able to set it some other way that allows for more versatility?

Sam

Samuel Leeman-Munk

non lue,
26 oct. 2015, 11:17:5326/10/2015
à theano-users
My IDE, it turns out, lets me associate particular environment variable settings with particular runs.
I'd still rather do something in code or in theanorc, but for the meantime I have a workaround because pycharm rocks.

Thanks,
Sam

Daniel Renshaw

non lue,
26 oct. 2015, 11:31:3026/10/2015
à theano...@googlegroups.com
You can change environment variables in code, for example:

    os.environ['CUDA_LAUNCH_BLOCKING'] = '1'

Such changes are visible to only the current process and will persist only for the duration of the process.

You may have to do this before calling "import theano" and, if true, probably means you can't change the value with any effect after calling "import theano".

Daniel

--

---
You received this message because you are subscribed to the Google Groups "theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to theano-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Samuel Leeman-Munk

non lue,
26 oct. 2015, 11:34:1926/10/2015
à theano...@googlegroups.com
That's fantastic! Thank you.

You received this message because you are subscribed to a topic in the Google Groups "theano-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/theano-users/oQe-Nj-ZgR4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to theano-users...@googlegroups.com.

Mustg Oplay

non lue,
22 oct. 2016, 08:45:1022/10/2016
à theano-users
Hi Sam,

I've been having a really hard time getting theano to play nice with pycharm. How did you get it to use the correct cl.exe and do you have .theanorc in the directory C:\Users\Name or were you able to change the path?

My ccbin and nvcc path to cl.exe apparently don't match. Your post gives me hope that it should work.

Thanks

Samuel Leeman-Munk

non lue,
22 oct. 2016, 09:25:2022/10/2016
à theano-users
Oh certainly. I use Tensorflow now, but I remember I put .theanorc in the standard location. I think the .theanorc is where you specify the cl.exe, but you can also specify environment variables in the runs dialog (where you specify what scripts to run.) Let me know if there's any other help I can provide!

Mustg Oplay

non lue,
22 oct. 2016, 10:41:4622/10/2016
à theano-users
Thanks for the quick reply. I'm currently getting the current error:

nvcc : fatal error : Compiler 'cl' in PATH different than the one specified with -ccbin

I'm not sure where -ccbin is defined.

I also found suggestions to change my .theanorc file and found that adding the following helped me get to this new error:

[nvcc]
flags=--use-local-env --cl-version=2010

Did you run into that at all?

And I am also interested in using tensor flow but most of what I read said it doesn't work in windows. Did you get that to work with PyCharm too?

Samuel Leeman-Munk

non lue,
22 oct. 2016, 13:56:5922/10/2016
à theano-users
I never got Tensorflow or Theano to work in Windows. This might be outside my area of expertise.
This may not work for your situation, but at this point, my solution was to switch to Linux.

Mustg Oplay

non lue,
22 oct. 2016, 14:36:2122/10/2016
à theano-users
Ok. Ty for trying 😀
Répondre à tous
Répondre à l'auteur
Transférer
0 nouveau message