Files
rocm-systems/projects/hip-tests/samples/2_Cookbook/13_occupancy
Jaydeep Patel f06e679b18 SWDEV-481861 - Add hipEventDestory for every hipEventCreate in all samples.
Change-Id: Ib1b860b02ef2640f321d54902b34ecf0e495ed65


[ROCm/hip-tests commit: dac779c834]
2024-08-29 13:22:19 -04:00
..

occupancy

  • Build the sample using cmake
$ mkdir build; cd build
$ cmake .. -DCMAKE_PREFIX_PATH=/opt/rocm
$ make
  • Execute the sample
$ ./occupancy
Manual Configuration with block size 32
kernel Execution time =  0.433ms
Theoretical Occupancy is 40%

Automatic Configuation based on hipOccupancyMaxPotentialBlockSize
Suggested blocksize is 1024, Minimum gridsize is 128
kernel Execution time =  0.037ms
Theoretical Occupancy is 80%

Manual Test PASSED!

Automatic Test PASSED!