incubator-gluten icon indicating copy to clipboard operation
incubator-gluten copied to clipboard

[VL] Simplify JniLibLoader

Open zhztheplayer opened this issue 1 year ago • 2 comments

Description

Overtime we find that JniLibLoader might be over-designed. Given that when a shared library is unable to be loaded, Gluten usually just refuses to do anything (e.g., just crashes). Thus ideally we load all the libraries needed, or we just raise fatal error.

JniLoader implemented a transactional loading mechanism that supports loading all the specified libraries together and with a rarely used "roll back" API. These stuffs may be the first priority to remove in the topic to simplify code.

zhztheplayer avatar Jun 19 '24 08:06 zhztheplayer

Hi @zhztheplayer I would like to work on this. Can you give some more clarity, we want to get rid of the transactional loading?

ArnavBalyan avatar Jun 26 '24 19:06 ArnavBalyan

we want to get rid of the transactional loading?

I think it doesn't make any actual difference with loading the libs one by one. Probably we can test and prove. The issue is somewhat benign as nevertheless we don't have much code in JniLibLoader.java. Anyway, feel free to take if you want. Thanks.

zhztheplayer avatar Jun 28 '24 01:06 zhztheplayer

I see thanks! I can do some testing and raise changes

ArnavBalyan avatar Aug 12 '24 13:08 ArnavBalyan