X Tutup
The Wayback Machine - https://web.archive.org/web/20200920015302/https://github.com/google/TensorNetwork/pull/831
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

Jax eigsh cleanup #831

Open
wants to merge 62 commits into
base: master
from
Open

Jax eigsh cleanup #831

wants to merge 62 commits into from

Conversation

@mganahl
Copy link
Collaborator

mganahl commented Sep 16, 2020

Clean up jax_lanczos in jitted_functions.py
depends in #830

mganahl added 30 commits Sep 11, 2020
@google-cla google-cla bot added the cla: yes label Sep 16, 2020
@codecov-commenter
Copy link

codecov-commenter commented Sep 16, 2020

Codecov Report

Merging #831 into master will decrease coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #831      +/-   ##
==========================================
- Coverage   98.44%   98.42%   -0.03%     
==========================================
  Files         128      128              
  Lines       21629    21607      -22     
==========================================
- Hits        21292    21266      -26     
- Misses        337      341       +4     
Impacted Files Coverage Δ
tensornetwork/backends/jax/jax_backend_test.py 99.15% <ø> (-0.01%) ⬇️
tensornetwork/backends/jax/jax_backend.py 100.00% <100.00%> (ø)
tensornetwork/backends/jax/jitted_functions.py 96.93% <100.00%> (-1.26%) ⬇️
...ensornetwork/backends/jax/jitted_functions_test.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update db50377...05afc26. Read the comment docs.

mganahl added 4 commits Sep 16, 2020
mganahl added 12 commits Sep 16, 2020
@@ -37,6 +37,14 @@ def tensordot(self, a: Tensor, b: Tensor,
raise NotImplementedError(
"Backend '{}' has not implemented tensordot.".format(self.name))

def configure(self, **kwargs) -> None: # pylint: disable=unused-argument
"""
Configure the backend.

This comment has been minimized.

@alewis

alewis Sep 17, 2020 Collaborator

A bit of elaboration might be useful here

This comment has been minimized.

@mganahl

mganahl Sep 17, 2020 Author Collaborator

hmm, this should actually not be here ..

def body_modified_gram_schmidt(i, vals):
vector, krylov_vectors = vals
v = krylov_vectors[i, :]
vector -= jax.numpy.vdot(v, vector) * jax.numpy.reshape(v, vector.shape)
vector = vector - jax.numpy.vdot(
v, vector, precision=precision) * v

This comment has been minimized.

@alewis

alewis Sep 17, 2020 Collaborator

Do we need the line break?

This comment has been minimized.

@mganahl

mganahl Sep 17, 2020 Author Collaborator

yapf's suggestion, can remove it

Av = matvec(jax.lax.reshape(normalized_vector, shape), *arguments)
alpha = jax.numpy.vdot(normalized_vector, Av, precision=precision)
alphas = alphas.at[i - 1].set(alpha)
betas = betas.at[i].set(

This comment has been minimized.

@alewis

alewis Sep 17, 2020 Collaborator

Another line break

mganahl added 3 commits Sep 17, 2020
@mganahl mganahl mentioned this pull request Sep 18, 2020
@mganahl mganahl requested a review from alewis Sep 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.
X Tutup