-
Notifications
You must be signed in to change notification settings - Fork 5
[Feature] Add ishermitian, isantihermitian, hermitianpart(!) and antihermitianpart(!)
#64
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
Conversation
Codecov Report❌ Patch coverage is
🚀 New features to boost your workflow:
|
|
Ok I've added a blocked version of the The cache-friendliness of the blocked strategy only seems to show up on my Mac M4 only for really large matrices (several thousands), but that might be because the Apple M processors have very big caches if I remember correctly. The performance seems roughly constant as soon as the blocksize is somewhere in the range 32 - 512, though I did not do any serious benchmarking. Also, this will be hardware dependent, and I assume older hardware would benefit from blocksizes on the smaller end of this range. Interface-wise, I would still like to propose the following changes:
Of course this will need dedicated GPU implementations (@kshyatt 😇). And maybe chainrules? I have not yet looked at the |
lkdvos
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely happy with project_hermitian etc instead, might even be nicer to not name-clash with LinearAlgebra too.
I think it might even pay off to add the optimization to the ishermitian check, since this is actually called in all the check_input(eigh_*, ...) methods.
The problem with this is that we then have to provide a I have some more questions about the current Final question concerns the naming. Are we fine shipping our own |
|
For the GPU support, since |
|
The difference with One proposal could be to use underscores always: Alternatively, we could use More ideas are welcome. |
|
On a different note, the blocked versions should probably be restricted to |
|
For the approx versions, we can probably then adapt the one in GPUArrays and revisit it if it's a performance problem, then |
In principle I would think we just provide one set of parameters for that and go from there? I'm okay with trying to pass an algorithm too, but realistically this is not something I will ever try to tweak, so if we can run just a few benchmarks for the blasfloats and select reasonable defaults from there I'd be happy.
Yes, I wasn't thinking about it too much. In principle I guess an optimal implementation should compute both the norm of
I think I'm okay with shipping our own. Given that we already have |
|
Ok, so we keep the current naming? Another question I had while modifying these implementations is when we restrict |
|
One more question: for |
|
I'm happy with the current names. I'm also happy with the default tolerances right now, since I would like to have |
|
Ok, for me this is also ready I think. I know I mentioned to also add |
Co-authored-by: Jutho <Jutho@users.noreply.github.com>
* Bump v0.6 * rename `gaugefix` -> `fixgauge` * reduce unnecessary warnings * fix `copy_input` signatures in Mooncake tests * Add changelog to docs
This is a small feature which I noticed can be useful in various contexts, and which I have definitely wanted to have in the toolbox myself at some point. It still needs some more tests and making sure we have the correct implementations, but I think this would be a good addition to the package.