-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggestion: Adding a CPU Database #60
Comments
The idea itself is good. Parsing in cmake might be super painful, but could be converted with a small python script.
Should be separate. E.g. on A64FX cachline size is 256 bytes vs 64 byte vector instruction length
|
I may guess that a Python script may be the most convenient option—we already depend on Python during build due to Yateto itself. Otherwise, we could of course use JSON, or convert from YAML to JSON (if YAML is easier to read for this which I'd assume).
Ok, then it shall be so.
Is it? If yes, where? (couldn't find it on |
https://github.com/SeisSol/SeisSol/blob/e6ef66194c9b4aecc62bd8d5e808427f1376a8d3/CMakeLists.txt#L473 -mno-red-zone should not be required for libxsmm_jit but only for the libxsmm generator. The flag is necessary as the offline generator wraps inline assembly inside a function, but the compiler does not inspect the inline assembly. Now if the inline assembly modifies the stack (pushq / popq) then it overwrites the "red zone" that the compiler thinks it's safe to use. |
IMO Json would be easier, you don't modify these settings that often anyways. Assuming this makes the CMake stuff easier.
Time to deprecate the old libxsmm generator? ;) |
Afaik the offline generator is deprecated for years... |
Yes, it is. I meant deprecating it in SeisSol as well and making the jit one standard |
Ok, found a CPU database which contains compiler flags and ISA info at least: https://github.com/archspec/archspec-json/blob/master/cpu/microarchitectures.json But, as far as I could see, no info on the cacheline etc. ... We could include something like the CPUID database here still. That one should have info there. With that, we would at least have the vector length to specify—i.e. maybe we'll have one template per vector instruction set in the end? As the gemmgen can usually be bound to a vector instruction set at least. And maybe we may add processors, if any of them have specialized gemmgen options. (long-term, we may have also to consider different floating point/number data types, and so on) To summarize, here are some more ideas for the format, now splitting between vector arch and CPU:
|
The idea is nice, but aren't we overthinking this a bit at this point? |
Hi everyone, this is more or less meant as a suggestion issue... So: we're getting to a point where we have many CPU architectures, so Yateto is getting cluttered with a lot of case distinctions. Therefore, the following suggestion: we move everything concerning a CPU architecture in Yateto and SeisSol into an extra file—at the caveat of having to parse it during configuration (or maybe generate a CMake file out of it before that). The following suggestion, as an example, we have Haswell here. The respective file would contain more archs in the end.
Here, we have:
name
denotes a text for pretty-printing (required)identifier
contains a list of unique strings which are used to select the arch (required)vendor
, as far as known, contains a vendor name (optional)isa
contains the basic ISA, and instruction set extensions as bullet points. (all optional)vectorsize
contains the size of the vector register (required? optional?)cachelinesize
contains the size of a cache line (maybe optional, maybe make it default to vectorsize)flags
contains compile flags, as currently used in SeisSol. (optional)clang
if provided, and togcc
ifclang
is not given.gemmgen
: the list of GEMM generators that Yateto uses, in preferred order (optional)DefaultGeneratorCollection
already.libxsmm_jit
,libxsmm
andpspamm
how the architecture is called internally. (maybe that's unnecessary forlibxsmm_jit
?) That is useful e.g. for using Zen 1,2,3 withlibxsmm
: here we would just setarch: hsw
.base
: a list of archs to inherit the options from. Archs that are mentioned later in the list override those that are in it earlier. (optional, by default assumed to be an empty list) Not shown in this example.Suggestions/comments? Did I forget something? Or does a database like that exist already and we only need one for the gemmgen options?
If you like this approach, we may also do sort of the same for GPUs in the end. That might lessen the work in the
hw_descr.py
as provided in gemmforge/chainforge.The text was updated successfully, but these errors were encountered: