nsight, an eclipse IDE for CUDA programming
- nvidia cuda-toolkit can be installed from here. Not necessary to have GPU device on local.
- set the system path for nvcc compiler.
- run
nvcc -V
on you local machine to get the version. - run the
nsight
on you local, it will open the nsight ide in GUI. - ssh into remote the server and pull the docker image on remote server using:
docker pull kayush206/ssh-docker
- run the docker image on remote server using:
nvidia-docker run -d -p <port>:22 kayush206/ssh-docker
. replace the<port>
with the available port of remote(i.e54321
).
-
Choose the project location on local as default and project type as
Empty Project
and click onNext
.
-
Under the
Basic settings
, tick theGenerate PTX code
andGenerate GPU code
as5.0
boxes and untick the2.0
boxes (not supported with cuda-9.0) and click onNext
.
-
Under
Target Systems
,click onmanage
and then click onadd
to add the remote connect details. replace the:<ip_addr of gpu server>
by gpu host address,<port>
by port to which container is mapped(i.e.54321
),- set
User name
toroot
, - set
Label
togpu-container
-
Under
Target Systems
, Add the project location and Toolkit details for remote(gpu-container
) And selcet thex86_64
as CPU Architecture inLocal System
andgpu-container
. -
Copy all the
*.cu
and*.h
files from thesrc
to project. -
Click on the
Run Configuration
fromRun
for configuring project in order to execute it on remote gpu server. -
Click on the
Remote
tab and inRemote Connection
choosegpu-container
. And verify thatRemote toolkit
is exactly same as/usr/local/cuda/bin
.
Edit theRemote executable
by clickingRun remote executable
to/root/nsight-workspace/hello_project/Debug/hello_project
after done with editing, click back toUpload local executable
.
-
In order to synchronize your project files between local and remote, select the
Set Active
togpu-container
.
And then, whenever you want to manually sync projecct files, click onSync Active Now
. -
In order to build the project, choose
Clean...
and thenBuild All
fromProject
tab. -
click on the run button (green circle). if everything goes fine you will be able to see the output as details for you gpu devices.