-
Notifications
You must be signed in to change notification settings - Fork 232
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
[Java] Add FP16 Support for Java Client #79
base: main
Are you sure you want to change the base?
Conversation
请问java把图片的rgb数组传到推理服务后,服务器需要的格式是uint8格式 java中把获取的r,g,b三个参数转成byt并添加到byte数组后 是有符号的二进制 那需要怎么才能转成无符号的二进制传呢? |
@jbkyang-nvi can you review this code? I think you were the one who mainly worked on the java client. If I'm mistaken, can you recommend someone who is familiar with it? |
@krishung5 can you take a look? I can review sometimes next week. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@du00cs Thanks for the contribution! Only a minor comment, otherwise LGTM. Apart from the changes, could you rebase onto the main branch as well? I will be testing these changes on our CI.
@@ -269,6 +269,50 @@ public double[] getOutputAsDouble(String output) { | |||
return (double[])getOutputImpl(out, double.class, ByteBuffer::getDouble); | |||
} | |||
|
|||
public float[] getOutputFp16AsFloat(String output) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add the comments for this function like the other ones just for the consistency?
Also change the minimum retryCnt to 0, retry can sometimes be expensive. If it is not acceptable, I will remove that.