This is an archive of the discontinued LLVM Phabricator instance.

[Polly] Specify the default values of the cache parameters
ClosedPublic

Authored by gareevroman on Dec 23 2016, 11:39 PM.

Details

Summary

If the parameters of the target cache (i.e., cache level sizes, cache level associativities) are not specified or have wrong values, we use ones for parameters of the macro-kernel and do not perform data-layout optimizations of the matrix multiplication. In this patch we specify the default values of the cache parameters to be able to apply the pattern matching optimizations even in this case. Since there is no typical values of this parameters, we use the parameters of Intel Core i7-3820 SandyBridge that also help to attain the high-performance on IBM POWER System S822 and IBM Power 730 Express server.

Diff Detail

Repository
rL LLVM

Event Timeline

gareevroman retitled this revision from to [Polly] Specify the default values of the cache parameters.
gareevroman updated this object.
gareevroman added a subscriber: pollydev.
grosser edited edge metadata.Dec 23 2016, 11:44 PM

Hi Roman,

thanks for the patch. I like the idea of this patch, but two comments:

  1. Please specify in the commit message and as comment in the code where/how you derived these values.
  1. I do not understand why you introduce new command line parameters. Could you not just add cl::init(num) to the existing parameters?
gareevroman updated this object.
gareevroman edited edge metadata.

Hi Roman,

thanks for the patch. I like the idea of this patch, but two comments:

  1. Please specify in the commit message and as comment in the code where/how you derived these values.

Hi Tobias,

thanks for the comments! I've updated it.

  1. I do not understand why you introduce new command line parameters. Could you not just add cl::init(num) to the existing parameters?

As far as I understand, the cl::init attribute can specify an initial value only for a scalar option. Is there a workaround to use cl::init with the cl::list class?

Hi Roman,

thanks for the patch. I like the idea of this patch, but two comments:

  1. Please specify in the commit message and as comment in the code where/how you derived these values.

Hi Tobias,

thanks for the comments! I've updated it.

  1. I do not understand why you introduce new command line parameters. Could you not just add cl::init(num) to the existing parameters?

As far as I understand, the cl::init attribute can specify an initial value only for a scalar option. Is there a workaround to use cl::init with the cl::list class?

Right. I did not see this. I see two options to work around this. Either we split the options into "-polly-target-1st-level-cache-associativity", "-polly-target-2nd-level-cache-associativity", or you add a static constant that contains the default cache sizes and use it in case the cache associativity list is of length zero.

But adding more options seems to be unnecessary (even though we have this with the cache size).

Update according to the comments.

grosser accepted this revision.Dec 25 2016, 7:38 AM
grosser edited edge metadata.
This revision is now accepted and ready to land.Dec 25 2016, 7:38 AM
This revision was automatically updated to reflect the committed changes.