intel: compute dispatches with variable workgroup size have ralloc_asprintf CPU overhead
According to @karolherbst, ralloc_asprintf
accounts for 33% of his rusticl kernel launch overhead. Apparently, this overhead is incurred on every compute dispatch with a variable workgroup size, due to explanatory error messages generated in brw_simd_should_compile
, most of which aren't actually used.
Specifically, the call-chain is:
iris_launch_grid
🠪 iris_upload_compute_state
🠪 iris_upload_compute_walker
🠪 brw_cs_get_dispatch_info
🠪 brw_simd_select_for_workgroup_size
🠪 brw_simd_should_compile
🠪 ralloc_asprintf
It likely makes sense to generate these messages when trying to compile shaders (since compilation might fail, and the overhead of an alloc & printf is miniscule compared to shader compilation), but we want to be able to skip it at state upload time (we know something will work and never report errors anyway).