mlc-ai / mlc-llm

Universal LLM Deployment Engine with ML Compilation
https://llm.mlc.ai/
Apache License 2.0
19.26k stars 1.58k forks source link

[Model] Optimize image preprocess for vision model #2981

Closed mengshyu closed 1 month ago

mengshyu commented 1 month ago

This PR improves the performance of image preprocessing for vision model. Generally, image storage formats include NCHW and NHWC, with NCHW being more suitable for GPU-based computations. Additionally, performance is enhanced by binding the for loop to GPU hardware threads.

MasterJH5574 commented 1 month ago

@mengshyu Let us know if it is ready for review :-)

mengshyu commented 1 month ago

Hi @MasterJH5574 , It's ready to review, could you take a look, thanks.

MasterJH5574 commented 1 month ago

Looks good, thanks!