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

Issue with int8/uint8 type for AveragePool and int8 for MaxPool #2991

Open
nives-vukovic opened this issue Apr 23, 2024 · 6 comments · May be fixed by #3725
Open

Issue with int8/uint8 type for AveragePool and int8 for MaxPool #2991

nives-vukovic opened this issue Apr 23, 2024 · 6 comments · May be fixed by #3725
Assignees
Labels
bug Something isn't working Under Investigation

Comments

@nives-vukovic
Copy link
Collaborator

nives-vukovic commented Apr 23, 2024

In #2973, uint8 type has been enabled for MaxPool, however following test cases are failing:

  • AveragePool with padding and uint8/int8 type
  • AveragePool with stride that is not default (in this case it is equal to 3)
  • MaxPool with padding and int8 type

Outputs of verify tests are provided in attachment.
log_avgpool_pad_error.txt
log_avgpool_stride_int8_error.txt
log_maxpool_int8_error.txt

@TedThemistokleous TedThemistokleous added the bug Something isn't working label Apr 24, 2024
@TedThemistokleous
Copy link
Collaborator

This ever get resolved?

@taylding-amd
Copy link
Contributor

Tested on the newest build:

  • AveragePool with padding and uint8/int8 type PASSED
  • AveragePool with stride that is not default (in this case it is equal to 3) PASSED
  • MaxPool with padding and int8 type FAILED
    image

@TedThemistokleous
Copy link
Collaborator

TedThemistokleous commented Oct 15, 2024

  • Fix issue with maxpool
  • Fix issue with avgpool

@taylding-amd
Copy link
Contributor

taylding-amd commented Oct 17, 2024

The MaxPool with padding and int8 type test passed without using MIOpen.
Built with CXX=/opt/rocm/llvm/bin/clang++ cmake .. -DGPU_TARGETS=$(/opt/rocm/bin/rocminfo | grep -o -m1 'gfx.*') -D MIGRAPHX_USE_MIOPEN=OFF
image

@taylding-amd
Copy link
Contributor

taylding-amd commented Oct 22, 2024

The error was due to MIOpen's trying to use the PoolingForwardNd solution, which only supports float and half data types.

MIOpen Error:
b5a54af1-3fbc-48ab-adc4-546636df3993

MIOpen Log:
83664004-e6cd-41b5-a0f9-c39d9f056d6e

PoolingForwardNd solution only supports float and half:
2148cdfd-8eaa-4c76-803e-dd04b949fb8e

@taylding-amd
Copy link
Contributor

By converting int8 to float for pooling, I was able to resolve the "no solution found" error in MIOpen. However, the test case still failed.
image

After comparing the output with the CPU results, I found that the mismatch occurred during the conversion from float back to int8. It appears that the kernel was converting the values to uint8 instead of int8.
image

@taylding-amd taylding-amd linked a pull request Dec 19, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Under Investigation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants