Intel® DevCloud
Help for those needing help starting or connecting to the Intel® DevCloud
1635 Discussions

How can I swap between different target hardware(CPU,GPU)

pihx
Employee
839 Views

I want to compare performance between CPU and GPU, training a NN with Tensorflow/Python.

How can I select target HW from Python running in DevCloud from a Terminal?

 

 

0 Kudos
1 Solution
Hari_B_Intel
Moderator
607 Views

Hi Pihx

 

Regarding your question on obtaining example resnet18_benchmark_job.sh, you can refer to any of the Intel DevCloud example applications which will show you how to submit the job.

Basically, qsub command is part of the Linux command, you can get more detail about qsub here https://man7.org/linux/man-pages/man1/qsub.1p.html

 

You can submit the python script to qsub, but the bash script can help in customizing the parameter for the python script. 

 

Also from the picture you have shown, it seems that the error "qsub : script is written in DOS/Windows text format" is due to unprintable end-of-line characters which may be misinterpreted by Linux command interpreters. 

To resolve this, you can use dos2unix on windows or Linux machines to convert the windows interpreters to Linux interpreters. After that, you can try to submit the job.  

 

DevCloud Example code : https://cdrdv2.intel.com/v1/dl/getContent/678623?explicitVersion=true

 

Hope the information help.

 

Thank you

 

View solution in original post

7 Replies
AlekhyaV_Intel
Moderator
805 Views

Hi,

 

Thank you for posting in Intel Communities. Could you please let us know which DevCloud you’re using? Is it DevCloud for oneAPI/Edge/FPGA?

 

If you're using oneAPI for DevCloud, please follow the below steps:

By connecting to specific compute node which hosts GPU/CPU, you can train your model & observe the performance difference. All you must do is connect to a GPU supported compute node. After logging in to devcloud, please try the below command to get connected to any available compute node with GPU:

 

qsub -I -l nodes=1:gpu:ppn=2 -d .

 

 

To connect to a CPU,

 

qsub -I -l nodes=1:cpu:ppn=2 -d .

 

 

Hope this helps!

 

Thanks & Regards,

Alekhya

 

0 Kudos
AlekhyaV_Intel
Moderator
763 Views

Hi,


Has the solution provided helped? Could you please give us an update regarding this issue?


Regards,

Alekhya


0 Kudos
pihx
Employee
743 Views

I am using DevCloud Edge- Terminal. And both commands gives me an error.

 

 

qsub -I -l nodes=1:cpu:ppn=2 -d .
qsub: submit error (Job rejected by all possible destinations (check syntax, queue resources, ...))

 

qsub -I -l nodes=1:gpu:ppn=2 -d .

qsub: submit error (Job rejected by all possible destinations (check syntax, queue resources, ...))

 

 

pihx_0-1652857680289.png

What do I do wrong?

Thanks

0 Kudos
Hari_B_Intel
Moderator
682 Views

Hi pihx

 

In DevCloud for edges, you can submit the job to the specific hardware you would like to use.

Here are some examples of commands you can use;

 

qsub resnet18_benchmark_job.sh -l nodes=1:idc045 -F "results/INT8 CPU async INT8" -v VENV_PATH,OPENVINO_RUNTIME 

 

Please make sure you're pointing to the script you would like to compare with a different devices and specifying the nodes (Platform).

 

Hope this information help

Thank you

 

0 Kudos
pihx
Employee
625 Views

Hi Hari_B,

Thanks for your reply. I don't know how to submit a job. Please, Where can I see the content of an example [resnet18_benchmark_job] .sh script and where to see the parameter documentation for qsub command? Or more precisely my goal is to run the "python myst2.py" command and measure the time it takes to finish with only CPU and with only GPU(or CPU+GPU, if GPU only is not possible)

 

pihx_1-1655923414475.png

 

Cause of Error: The .sh should just be LF, not CR+LF, right?

 

Can the submit job be a python script, or do I need to put my "python myst2.py" inside a .sh script?

 

Thanks for any advise!

Pihx

0 Kudos
Hari_B_Intel
Moderator
608 Views

Hi Pihx

 

Regarding your question on obtaining example resnet18_benchmark_job.sh, you can refer to any of the Intel DevCloud example applications which will show you how to submit the job.

Basically, qsub command is part of the Linux command, you can get more detail about qsub here https://man7.org/linux/man-pages/man1/qsub.1p.html

 

You can submit the python script to qsub, but the bash script can help in customizing the parameter for the python script. 

 

Also from the picture you have shown, it seems that the error "qsub : script is written in DOS/Windows text format" is due to unprintable end-of-line characters which may be misinterpreted by Linux command interpreters. 

To resolve this, you can use dos2unix on windows or Linux machines to convert the windows interpreters to Linux interpreters. After that, you can try to submit the job.  

 

DevCloud Example code : https://cdrdv2.intel.com/v1/dl/getContent/678623?explicitVersion=true

 

Hope the information help.

 

Thank you

 

Hari_B_Intel
Moderator
575 Views

This thread will no longer be monitored. If you need any additional information from us, please submit a new question.


0 Kudos
Reply