Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Peak ALU line does not extend to end of chart (web GUI) #345

Open
benrichard-amd opened this issue Apr 15, 2024 · 0 comments
Open

Peak ALU line does not extend to end of chart (web GUI) #345

benrichard-amd opened this issue Apr 15, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@benrichard-amd
Copy link
Contributor

Describe the bug

When profiling a workload with very high arithmetic intensity, the peak ALU line stops in the middle of the chart while the data points appear further right.

To Reproduce

Profile workload with very high arithmetic intensity (example program below)

Analyze in web GUI

Expected behavior
The peak ALU rooflines extend to the end of the chart (or at least appears above the data points)

Screenshots

off_the_charts

Additional context

#include <hip/hip_runtime.h>

__global__ void busy_kernel(float *in, float *out, float x, int size) {
  int tid = blockIdx.x * blockDim.x + threadIdx.x;

  if (tid < size) {
    float value = in[tid];

    float v0 = value;
    float v1 = v0 * v0 + 1.0f;
    for(int i = 0; i < 10000; i++) {

	    for(int j = 0; j < 32; j++) {
	    	v0 = v0 * v0 + x;
	    	v1 = v1 * v1 + x;
	    }
    }

    out[tid] = v0 + v1;
  }
}

int main() {
  int size = 1024 * 1024;
  int *in, *out;
  hipMalloc(&in, size * sizeof(float));
  hipMalloc(&out, size * sizeof(float));

  int blockSize = 64;
  int gridSize = (size + blockSize - 1) / blockSize;

  hipLaunchKernelGGL(busy_kernel, dim3(gridSize), dim3(blockSize), 0, 0, (float*)in, (float*)out, 1.0f, size);
  
  hipDeviceSynchronize();

  hipFree(in);
  hipFree(out);

  return 0;
}
@benrichard-amd benrichard-amd added the bug Something isn't working label Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant