I have a model and strict requirements for warm up time = 2s. Runtime speed is ok for us now.
I already tried to set
tf.env().set('WEBGL_EXP_CONV', true)
tf.env().set('WEBGL_USE_SHAPES_UNIFORMS', true)
I turned on parallel shaders compilation. But still have time about 4s. Individual shaders for every tensor shape help to speedup runtime but slow down warm up process as lead to shaders count increase.
Is there any full list of possible current improvements to check, what I missed?
My environment Windows + Intel embedded GPU (but MacOS is also among target platforms)
do a compile-only pass to warmup the webgl engine:
tf.env().set('ENGINE_COMPILE_ONLY', true);
,model.execute
with tensor created withtf.zeros
its an experimental feature and only works for models that do not explicitly require async execution.