Hi,
What is the best way to model a scheduler for a VLIW in-order architecture?
I’ve looked at the Hexagon and R600 architectures and they are using itineraries. I wanted to understand the benefit in using itineraries over the per operand scheduling.
I also found this thread from almost 2 years ago:
http://lists.llvm.org/pipermail/llvm-dev/2016-April/098763.html
At that time it seemed the itineraries are a better choice, but is it still the case?
Also, in this thread Phil says:
“Some of the constraints that can be found in in-order micro architectures cannot be expressed in the per-operand scheduling model”
Does anybody have an example of such constraints that will be harder to model with per operand scheduling?
Thanks,
Marina
---------------------------------------------------------------------
Intel Israel (74) Limited
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
I also found this thread from almost 2 years ago:
http://lists.llvm.org/pipermail/llvm-dev/2016-April/098763.html
At that time it seemed the itineraries are a better choice, but is it still the case?
Also, in this thread Phil says:
“Some of the constraints that can be found in in-order micro architectures cannot be expressed in the per-operand scheduling model”
Does anybody have an example of such constraints that will be harder to model with per operand scheduling?
ARM might be a good start for generic superscalar. Hexagon for VLIW style scheduling.
On Feb 4, 2018, at 9:15 AM, Yatsina, Marina via llvm-dev <llvm...@lists.llvm.org> wrote:Hi,What is the best way to model a scheduler for a VLIW in-order architecture?I’ve looked at the Hexagon and R600 architectures and they are using itineraries. I wanted to understand the benefit in using itineraries over the per operand scheduling.I also found this thread from almost 2 years ago:At that time it seemed the itineraries are a better choice, but is it still the case?Also, in this thread Phil says:“Some of the constraints that can be found in in-order micro architectures cannot be expressed in the per-operand scheduling model”Does anybody have an example of such constraints that will be harder to model with per operand scheduling?Thanks,Marina
On Feb 4, 2018, at 9:15 AM, Yatsina, Marina via llvm-dev <llvm...@lists.llvm.org> wrote:Hi,What is the best way to model a scheduler for a VLIW in-order architecture?I’ve looked at the Hexagon and R600 architectures and they are using itineraries. I wanted to understand the benefit in using itineraries over the per operand scheduling.
The main concern for us was which of these mechanisms contains all the
information that we need. We cannot express all the scheduling details
by hand, and majority of it was auto-generated anyway. I don't know if
the new model has all the required pieces of information, but we've been
using itineraries for a while, and we stuck with them.
The short answer is "because it works", but it's not meant to imply that
nothing else would.
-Krzysztof
On 2/8/2018 8:49 AM, 陳韋任 wrote:
> Hi Krzysztof,
>
> 2018-02-08 13:32 GMT+08:00 Andrew Trick via llvm-dev
> <llvm...@lists.llvm.org <mailto:llvm...@lists.llvm.org>>:
>
>
>
>> On Feb 4, 2018, at 9:15 AM, Yatsina, Marina via llvm-dev
>> <llvm...@lists.llvm.org <mailto:llvm...@lists.llvm.org>> wrote:
>>
>> Hi,____
>> __ __
>> What is the best way to model a scheduler for a VLIW in-order
>> architecture?____
>> I’ve looked at the Hexagon and R600 architectures and they are
>> using itineraries. I wanted to understand the benefit in using
>> itineraries over the per operand scheduling.
>
> Do you have time to give comment on why Hexagon still use itineraries,
> rather than switching to per operand scheduling like ARM does? I really
> like to hear your opinion.
>
> Thanks. :-)
>
> --
> Wei-Ren Chen (陳韋任)
> Homepage: https://people.cs.nctu.edu.tw/~chenwj
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
_______________________________________________
LLVM Developers mailing list
llvm...@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
> On Feb 8, 2018, at 11:40 AM, Krzysztof Parzyszek via llvm-dev <llvm...@lists.llvm.org> wrote:
>
> We have a two different dimensions for each instruction: slot assignments, and operand timings. These two are unrelated to each other, and also each (or both) can change for any given instruction from one architecture version to the next.
>
> The main concern for us was which of these mechanisms contains all the information that we need. We cannot express all the scheduling details by hand, and majority of it was auto-generated anyway. I don't know if the new model has all the required pieces of information, but we've been using itineraries for a while, and we stuck with them.
>
> The short answer is "because it works", but it's not meant to imply that nothing else would.
>
> -Krzysztof
That reminds me, in the new model, there are two different ways to define issues constraints:
ARMScheduleSwift has two ALU pipes. Some instructions can issue on either one, so we define a superset “P01” resource like this:
def SwiftUnitP01 : ProcResource<2>; // ALU unit.
def SwiftUnitP0 : ProcResource<1> { let Super = SwiftUnitP01; } // Mul unit.
def SwiftUnitP1 : ProcResource<1> { let Super = SwiftUnitP01; } // Br unit.
Haswell allows an instruction to issue an any arbitrary set of ports, so it uses groups:
def HWPort1 : ProcResource<1>;
def HWPort2 : ProcResource<1>;
def HWPort3 : ProcResource<1>;
def HWPort4 : ProcResource<1>;
def HWPort5 : ProcResource<1>;
def HWPort6 : ProcResource<1>;
def HWPort7 : ProcResource<1>;
// Many micro-ops are capable of issuing on multiple ports.
def HWPort01 : ProcResGroup<[HWPort0, HWPort1]>;
def HWPort23 : ProcResGroup<[HWPort2, HWPort3]>;
def HWPort237 : ProcResGroup<[HWPort2, HWPort3, HWPort7]>;
…
IIRC: they’re modeled the same way and ProcRegGroup is just computing superset relations for you.
And an instruction on pipe/port “01” can issue on either dynamically, so a subsequent pipe/port “0” instruction could issue in the same cycle.
For something like slot assignments, I would be tempted to write an small independent state machine as part of the hazard checker, then use the machine model (either itinerary or per-operand) just for operand timings.
-Andy
Thank you so much for the detailed answer!
Our target only uses one resource at a time, so based on what you said, itineraries do not have any advantage over the new scheduling model.
The per operand model seems to be the way to go.
Thanks,
Marina
---------------------------------------------------------------------
Intel Israel (74) Limited