Git Product home page Git Product logo

omptest's People

Contributors

matthiasdiener avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

yaronk3 umeshpp

omptest's Issues

test host device

Hi @matthiasdiener,
thank you for your GCC offloading compilation script. It helped me a lot. I am testing the offloading now, but I don't understand part of your test application.

omptest/HybridOMP.C

Lines 35 to 50 in 403e28d

for (int i=0; i<num_devices_visible; i++)
{
int A[1] = {-1};
#pragma omp target
{
A[0] = omp_is_initial_device();
}
if (A[0]==0)
num_gpus++;
else
printf("A[0]=%d\n",A[0]);
}
if (num_gpus == 0)
printf("HybridOMP: Able to use offloading: %s, #devices visible: %d #devices available: %d\n", num_gpus>0?"yes":"NO", num_devices_visible, num_gpus);
return num_gpus;

  • Let say you have N devices available. The loop just says that you offload the code N times, but you don't specify to which device to offload, so probably it will be offloaded always to the same device. Am I right?
  • Specification says that omp_is_initial_device() returns true (despite it is int) if the task is executed at a host device. You increment num_gpus if the function returns 0 (false), and then at line 49 you say that offloading is possible if the num_gpus > 0 .
  • The condition at line 48 is the same as the condition at the following line, so there is a dead code.

I hope you get my point.

When executing your test application omp_is_initial_device() always returns 0. ldd confirms, that the binary is linked with the libraries from the GCC (GCC-10.2.0 or GCC-7.3.0 + CUDA/10.2.89) I have compiled (libstdc++.so, libgomp.so, libgcc_s.so). Do you have an idea could be wrong?

Thank you.
Ondra

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.