GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — HPCTrainingExamples/Pragma_Examples/OpenMP/USM at main · amd/HPCTrainingExamples

Expand file tree

/

USM

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

USM

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
vector_add_auto_zero_copy
vector_add_auto_zero_copy
 
 
vector_add_usm
vector_add_usm
 
 
README.md
README.md
 
 

README.md

Explore Unified Shared Memory with OpenMP

Explore the behavior of the examples in this folder with and without HSA_XNACK enabled. Use:

export LIBOMPTARGET_INFO=-1

to see if the memory is moved when you set

export HSA_XNACK=0

If you set

export HSA_XNACK=1

the memory copies are gone automatically in the vector_add_auto_zero_copy example:

To compile and run:

cd vector_add_auto_zero_copy
make
./vector_add_auto_zero_copy

To compile and run the other example:

cd vector_add_usm
// can only run with
export HSA_XNACK=1
make
./vector_add_usm

Note, this can only run with HSA_XNACK=1. Observe the differences in the codes (Hint: vimdiff file1 file2 may help).

The first example shows code that is portable between the APU and discrete GPUS. The second example shows the ease of porting (no map clauses or any other data management required) if you start from the CPU and have an APU available to do the porting.

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.