Unable to use Intel oneAPI DPCT for migration of my applicaiton: Error Code -5 - intel-oneapi

I'm attempting to follow the instructions from this site https://software.intel.com/content/www/us/en/develop/documentation/get-started-with-intel-dpcpp-compatibility-tool/top.html. I receive an error when I use the dpct command, stating that the path for CUDA header files is incorrect. Now, in order to add the CUDA path, I must first install the CUDA toolkit, which I am unable to accomplish without sudo access and I don't have sudo privilege to my other server. Can someone please help me here.
dpct exited with code: -5 (Error: Path for CUDA header files is invalid or not available. Use --cuda-include-path to specify the correct path to the header files)

You can install CUDA toolkit in your home directory. You may find the instructions on the Nvidia official webpage that home directory installation doesn't require sudo.
Once you have installed the toolkit, use the below command to perform migration for a single source file as below:
dpct --cuda-include-path=/path/to/cuda/include sample.cu
Thanks,
Santosh

Related

How can I run Mozilla TTS/Coqui TTS training with CUDA on a Windows system?

I have a machine with a Quadro P5000 graphics card, running Windows 10. I'd like to train a TTS voice on this system. What do I need to install to make this work?
Here's what to install/do:
Download and install Python 3.8 (not 3.9+) for Windows. During the installation, ensure that you:
Opt to install it for all users.
Opt to add Python to the PATH.
Download and install CUDA Toolkit 10.1 (not 11.0+).
Download "cuDNN v7.6.5 (November 5th, 2019), for CUDA 10.1" (not cuDNN v8+), extract it, and then copy what's inside the cuda folder into C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1.
Download the latest 64-bit version of eSpeak NG (no version constraints :-) ).
Download the latest 64-bit version of Git for Windows (no version constraints :-) ).
Open a PowerShell prompt to a folder where you'd like to install Coqui TTS.
Run git clone https://github.com/coqui-ai/TTS.git.
Run cd TTS.
Run python -m venv ..
Run .\Scripts\pip install -e ..
Run the following command (this differs from the command you get from the PyTorch website because of a known issue):
.\Scripts\pip install torch==1.8.0+cu101 torchvision==0.9.0+cu101 torchaudio===0.8.0 -f https://download.pytorch.org/whl/torch_stable.html
Put the following into a script called "test_cuda.py" in the TTS folder:
import torch
x = torch.rand(5, 3)
print(x)
print(torch.cuda.is_available())
Run the script via .\Scripts\python ./test_cuda.py and confirm the output looks like this (the first part should have just random numbers, but the last line must read True; if it does not, CUDA is not installed properly):
tensor([[0.2141, 0.7808, 0.9298],
[0.3107, 0.8569, 0.9562],
[0.2878, 0.7515, 0.5547],
[0.5007, 0.6904, 0.4136],
[0.2443, 0.4158, 0.4245]])
True
Put the following into a script called "train.bat" in the TTS folder, and then customize it for your configuration file:
set PYTHONIOENCODING=UTF-8
set PYTHONLEGACYWINDOWSSTDIO=UTF-8
set PHONEMIZER_ESPEAK_PATH=C:/Program Files/eSpeak NG/espeak-ng.exe
.\Scripts\python.exe ./TTS/bin/train_tacotron.py --config_path "C:/path/to/your/config.json"
Run the script via .\train.bat.
If you are using a different model than Tacotron or need to pass other parameters into the training script, feel free to further customize train.bat.
If you are just getting started with TTS training in general, take a peek at How do I get started training a custom voice model with Mozilla TTS on Ubuntu 20.04?.

Cannot import Selenium even when it's installed [duplicate]

After searching the web for hours i didnt yet find an answer to my problem. I am using Python 3.6 and i cant import selenium. I always get the message "No module named 'selenium''
I tried everything, i first downloaded selenium from this website https://pypi.python.org/pypi/selenium/3.6.0 .
Then I tried python -m pip install -U selenium and didnt work either. I tried some other things that people said but they didnt work either.
Im using windows 10.
Any help?
As you mentioned you are using Python 3.6 following the steps :
Open Command Line Interface (CLI) and issue the command python to check if Python is properly installed :
C:\Users\username>python
Python 3.6.1 (v3.6.1:69c0db5, Jan 16 2018, 17:54:52) [MSC v.1900 32 bit (Intel)]
on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
Ensure pip is working properly :
C:\Users\username>pip
Usage:
pip <command> [options]
Commands:
install Install packages.
download Download packages.
uninstall Uninstall packages.
freeze Output installed packages in requirements format.
list List installed packages.
show Show information about installed packages.
check Verify installed packages have compatible dependencies.
search Search PyPI for packages.
wheel Build wheels from your requirements.
hash Compute hashes of package archives.
completion A helper command used for command completion.
help Show help for commands.
General Options:
-h, --help Show help.
--isolated Run pip in an isolated mode, ignoring environment variables and user configuration.
-v, --verbose Give more output. Option is additive, and can be used up to 3 times.
-V, --version Show version and exit.
-q, --quiet Give less output. Option is additive, and can be used up to 3 times (corresponding to WARNING, ERROR, and CRITICAL logging levels).
--log <path> Path to a verbose appending log.
--proxy <proxy> Specify a proxy in the form [user:passwd#]proxy.server:port.
--retries <retries> Maximum number of retries each connection should attempt (default 5 times).
--timeout <sec> Set the socket timeout (default 15 seconds).
--exists-action <action> Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup, (a)bort.
--trusted-host <hostname> Mark this host as trusted, even though it does not have valid or any HTTPS.
--cert <path> Path to alternate CA bundle.
--client-cert <path> Path to SSL client certificate, a single file containing the private key and the certificate in PEM format.
--cache-dir <dir> Store the cache data in <dir>.
--no-cache-dir Disable the cache.
--disable-pip-version-check
Don't periodically check PyPI to determine
whether a new version of pip is available for
download. Implied with --no-index.
Install latest selenium through pip :
C:\Users\username>pip install -U selenium
Collecting selenium
Downloading selenium-3.8.1-py2.py3-none-any.whl (931kB)
100% |¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦| 942kB 322kB/s
Installing collected packages: selenium
Successfully installed selenium-3.8.1
Confirm that Selenium is installed :
C:\Users\username>pip freeze
selenium==3.8.1
Open an IDE (e.g Eclipse, PyCharm) and write a simple program as follows :
from selenium import webdriver
driver = webdriver.Firefox(executable_path="C:\\path\\to\\geckodriver.exe")
driver.get('https://stackoverflow.com')
Execute the program on which Firefox Quantum Browser will be initiated and the url https://stackoverflow.com will be accessed.
Python Download Location (Windows) :
Python (for Windows) can be download from the following location :
https://www.python.org/downloads/
I'm on VS Code in Windows 10, and here's how I solved it.
You need to pay attention to where the Python is located (in my case),
1) C:\Users\_Me_\AppData\Local\Programs\Python\Python38\
and where the Python looks for libraries/packages, including the ones installed using pip (again, in my case),
2) C:\Users\_Me_\AppData\Roaming\Python\Python38\
I don't know why these two locations are different (gotta fix it at some point). It seemed that Python was running from the first location, but it was looking for libraries in the second!:/
Anyway, since I have limited experience in Python , I just copied the \Lib\site-packages from the first location (including selenium folders) to \site-packages in second one in hopes of solving the issue, which worked out for me!
How to check for there locations
1) Open Python CLI, typed the following command:
which python
2) Open Python CLI, typed the following commands (From this answer):
>>> import site
>>> site.USER_SITE
EDIT
Since this seems a temporary solution, I uninstalled Python and reinstalled it again in a proper directory (other than the default install directory), and now which python and which pip point to the same folder! Problem solved!
If these solutions did not work for you, try looking into which Python interpreter your IDE is using (in my case I was using VSCode - you can find the interpreter in the bottom bar). Worked for me.
Easiest way is to copy all files of "venv" Lib, Scripts, Selenium and other folder into your main project folder.
This issue occur as pycharm directly take from virtual environment venv.
Hope this will resolve your problem :)

TensorCPU build: dependencies downloading issue

I am trying to build tensorflow cpu version on my centos 6.5, but i am stuck :-
bazel build -c opt //tensorflow/cc:tutorials_example_trainer
........
WARNING: Sandboxed execution is not supported on your system and thus hermeticity of actions cannot be guaranteed. See http://bazel.io/docs/bazel-user-manual.html#sandboxing for more information. You can turn off this warning via --ignore_unsupported_sandboxing.
INFO: Downloading from http://www.ijg.org/files/jpegsrc.v9a.tar.gz: 0B
it tries to download jpeg/eigen/png tar files but is unable to do so due to lack of internet connectivity on my machine .
I can download & put all these dependencies somewhere within the tensorflow sourcecode directory so that build procedure automatically detect them.
Could you please suggest the path to that directory ( relative to tensorflow src root directory)? or is there a file which needs modification?
I tried placing it under $TENSOR_SRC_ROOT/tensorflow/contrib/cmake/external, but that did not help.
Eagerly awaiting your replies,
thanks to bazel development team, setting HTTP_PROXY & HTTPS_PROXY in my environment resolved the issue.

Node-Webkit gclient sync error

I want to build Node-Webkit. I followed the instructions from this site https://github.com/rogerwang/node-webkit/wiki/Building-node-webkit but the part with the .gclient file didn't work.
After the command gclient sync --nohooks, I get this:
ERROR: client not configured; see 'gclient config'
The solution I found for this problem was the gclient config http://... command with a link like https://src.chromium.org/svn/trunk/src or similar ones. But with these links gclient doesn't download the Node-Webkit stuff.
So is there a working link for this problem or a option to download the stuff without gclient?
I did it with a fresh installed Ubuntu 12.04 in a virtual machine because the install-build-deps.sh I have to execute later does not support my Ubuntu 13.10.
Could the vm be the problem?
You need to set config to gclient, which generates .gclient in home folder. Read more here

Jython easy_install error

My purpose to add some python libraries to jython i.e suds package
To do this tried to follow the instruction from http://www.jython.org/jythonbook/en/1.0/appendixA.html#setuptools
and also checked;
How can I install various Python libraries in Jython?
Installed Jython 2.5.2 and added JYTHON_HOME=C:\jyhon252 to environment variables and %JYTHON_HOME%\bin to path
jython is working fine.
As second step tried to install easy_install on top of Jython 2.5.2
got ez_setup.py from;
http://peak.telecommunity.com/dist/ez_setup.py
Tried to install ez_setup.py and got following error that I couldnt find any clue how to solve it.
same thing happening with Jython 2.5.3 also.
C:\tmp\ez_setup>jython ez_setup.py
Downloading http://pypi.python.org/packages/2.5/s/setuptools/setuptools-0.6c11-py2.5.egg
Processing setuptools-0.6c11-py2.5.egg
Removing c:\jython252\lib\site-packages\setuptools-0.6c11-py2.5.egg
Copying setuptools-0.6c11-py2.5.egg to c:\jython252\lib\site-packages
error: c:\jython252\lib\site-packages\setuptools-0.6c11-py2.5.egg: Unknown error: 20047
I had Windows 7 64bit OS and 32 Bit jre 1.6.0_38 available on my device.
Does anyone have any idea how I can solve this? May I missing some thing ?
Thanks in advance..
It was because of windows 7, just use another OS.
Remove older versions of java and install jdk7
Install JYTHON from jar:
java -jar jython-installer-2.7-b2.jar
Set up environment variables:
Add to existing PATH:
C:\jython2.7b2;C:\Program Files (x86)\Java\jdk1.7.0_67\bin
Create PYTHON and add:
C:\jython2.7b2\Lib\site-packages\;
Install easy_install
Download ez_setup.py
Open file and copy paste intall url into browser to download the setuptools-5.7.zip file.
Move the zip into the same folder as ez_setup.py.
Then run it: jython setup.py install
The easy_install will have moved files to your C:\Python27
copy all the files from C:\Python27\Lib\site-packages to C:\jython2.7b2\Lib\site-packages
copy all the files from C:\Python27\Scripts to C:\jython2.7b2\bin
Delete C:\Python27
Finally, you need to edit all the scripts so that they don't use Python.exe.
Change it to: #!C:\jython2.7b2\jython.bat