-
Notifications
You must be signed in to change notification settings - Fork 76
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
Microchip Micro 3588 rknn_ Npu2 problem #186
Comments
You linked an unmaintained project. Also it looks like the function you are calling returns an int32 not a uint32. https://github.com/airockchip/rknn-toolkit2/blob/b25dadacc24b88eb7dfcaa47c9c525ecca89b319/rknpu2/examples/rknn_yolov5_android_apk_demo/app/src/main/cpp/rknn_api.h#L460 int in C is 32bit signed not unsigned. Using |
rknn_query The return value only proves that the execution was successful. A pointer was passed in the parameter, and the function changed the value of the pointer, which is also required by the program. The function was executed twice, with the first execution result being correct and the second failure to obtain the correct io_num |
@corner4world is this still happening with the latest commit? |
Hello, I am using v0.5.1 |
Are you saying it's still happening? If so, can you try the latest commit? 33b97fd |
This is my project code: |
I am using Purego to call Microchip Micro 3588 rknn_ Npu2, after registering the corresponding function, use rknn_query function returns an error in uint32 when querying model input:
Expected: Model input num: 1, output num: 1
Result: Model input num: 508, output num: 4294967295
The code is as follows:
package main
import (
"fmt"
"github.com/ebitengine/purego"
"io"
"os"
"unsafe"
)
func openLibrary(name string) (uintptr, error) {
return purego.Dlopen(name, purego.RTLD_NOW|purego.RTLD_GLOBAL)
}
func load_model(model_path string) (model []byte, model_len int64, err error) {
file, err := os.Open(model_path)
if err != nil {
panic(err)
}
}
func main() {
var ctx rknn_context
librknn, err := openLibrary("/userdata/rknpu2/runtime/RK3588/Linux/librknn_api/aarch64/librknn_api.so")
if err != nil {
panic(err)
}
}
The text was updated successfully, but these errors were encountered: