Skip to content

Conversation

@Liangxijun-1001
Copy link
Contributor

My env:AMD RX 7600
I debugged the MIOpen source code for a specific reason. During the model compilation phase, the Python side calls the conv2d.setup interface, invoking MIOpen's findConvForwardAlgorithm interface to find the appropriate algorithm. Subsequently, the corresponding <layer-Problem, Algorithm> pair is registered within the current invokers. Then, without terminating the current process, during the inference stage, the invoker can identify the Algorithm for the corresponding layer-problem and perform direct inference.

However, if the current process is exited and the pre-compiled model is executed without the prior invocation of findConvForwardAlgorithm during the compilation phase, the corresponding <layer-Problem, Algorithm> pair won't be registered within the invokers. As a result, the inference stage will report an error stating "MIOpen Error: No invoker was registered for convolution forward."

Based on the distinction between MIOpen and cuDNN invocation provided by the MIOpen official documentation, the typical sequence for calling Convolution APIs in MIOpen is as follows:

miopenConvolution*GetWorkSpaceSize(): This function returns the workspace size required by the Find() operation.

miopenFindConvolution*Algorithm(): This function returns performance information about various algorithms.

miopenConvolution*(): Actual convolution operation.

The official documentation emphasizes that calling miopenFindConvolution*Algorithm() is mandatory before using any Convolution API.

Additionally, according to the documentation found at https://rocm.docs.amd.com/projects/MIOpen/en/latest/convolution.html#miopenfindconvolutionforwardalgorithm, the last parameter of the miopenFindConvolutionForwardAlgorithm interface, exhaustiveSearch, should be set to 1 (true):

If exhaustiveSearch == 0, MIOpen will seek the first kernel with a configuration match. If no configuration match is found, a default configuration will be returned.

If exhaustiveSearch == 1, MIOpen will search for the best kernel for the provided configuration. If a match is not found, an exhaustive search is performed by running individual algorithms.

For further details refer to this link: https://rocmdocs.amd.com/projects/MIOpen/en/latest/MIOpen_Porting_Guide.html

@Liangxijun-1001 Liangxijun-1001 force-pushed the v0.14.0_pr branch 2 times, most recently from c38cbd6 to aa59a4a Compare November 30, 2023 04:21
…Open Error: No invoker was registered for convolution forward.

Signed-off-by: liangxijun <lxjqq365@126.com>
Signed-off-by: Liangxijun-1001 <lxjqq365@126.com>
@Liangxijun-1001
Copy link
Contributor Author

Liangxijun-1001 commented Dec 1, 2023

cc: @tqchen @masahi @Lunderberg

@masahi
Copy link
Member

masahi commented Dec 1, 2023

Please revert the ethos-U related change.

@Liangxijun-1001
Copy link
Contributor Author

Please revert the ethos-U related change.

Okay,I will revert it

@Liangxijun-1001 Liangxijun-1001 changed the base branch from main to v0.14.0 December 2, 2023 00:03
@masahi
Copy link
Member

masahi commented Dec 5, 2023

I assume #16190 is the newer one

@masahi masahi closed this Dec 5, 2023
@Liangxijun-1001
Copy link
Contributor Author

I assume #16190 is the newer one

Yes,this pr should be closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants