Skip to content
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

Fix some aspects of the control tre/plugin infrastructure #827

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

devinamatthews
Copy link
Member

  1. Use configure-time variable substitution rather than the PNAME macro to generate symbol names in plugins. This makes it much easier for uses to see what names their symbols will have (and to change them if desired).
  2. Use siz_t rather than ukr_t for anything dealing with kernel IDs (and similar for blocksizes and kernel preferences). Because users can now register new kernels, the values of the IDs for their custom kernels are no longer enumerated in ukr_t, which causes type conversion problems. This requires also being careful about the type of BLIS_VA_END and forcing existing enumerations like ukr_t to be represented using integers of the same width as siz_t.
  3. Modify the gemm control tree initialization function to indicate whether or not the operation as a whole was transposed. This is needed if users have to treat the initial A and B differently in the control tree, for example in a tensor times matrix operation (if transposed to matrix times tensor, we need to know which "matrix" object is now the tensor).

- User-registered kernels are contained in the `ukr_t`, `bszid_t`, and `ukr_pref_t` enums, so prefer `siz_t` for all functions taking kernel ID parameters.
- However, because enum constants are by default `int` (or even smaller), while `siz_t` will typically be `long long unsigned int`, this causes problems with variadic arguments in `bli_cntx_set_ukrs` and friends (predefined vs. user-registered kernel IDs will be incompatible types).
- Solution: define `BLIS_VA_END` explicitly as `(siz_t)-1` and add an enum entry equal to `BLIS_VA_END` (=`0xf...f`) to each affected enum in order to force the underlying enum type to be as wide as `siz_t`.
Return a bool which is true iff the operation was transposed (C = A B -> C^T = B^T A^T).
@devinamatthews
Copy link
Member Author

I'll fix the build shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant