Hi Jeff and Robin,

> VLEN is considered during vector costing.  That's what it does by default (via
> vectorization factor and more), I just mentioned what we need to do on top of
> that to fairly compare against scalar.

Thanks for clarification, I wasn't aware VLEN already considered. 
good to know while I'm still getting familiar with current implementation.

> I'd think the scheduler model would be tough to extract what we want
> from, though it would likely be a lot more accurate if we could.

> If there's any hook that gets us into target bits, then we could query
> the issue rate as a reasonable proxy.


After all, "cost" is an abstract concept, extracting that from the scheduler 
model still not the best. 

Actully I'm thinking If there is a PGO-like feedback loop that automatically 
tunes vector cost adjustments 
by benchmarking different configurations would be very valuable. 
This could help us catch cases where the current heuristics make poor choices 
(e.g., bad LMUL selection or vectorizing when scalar is faster).

Right now I’m finding these issues manually, which is slow and doesn’t scale. 
Is there any existing GCC infrastructure that could support automated 
cost-model tuning, 
or do you have recommendations on the best way to build such a system?


Regards
Zhongyao

Reply via email to