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

[FSU] Modify the condition of LoadTensors #2843

Closed
wants to merge 2 commits into from

Conversation

SeoHyungjun
Copy link
Member

Previously, more layers were loaded into memory than the value of lookahead.
I modified the code so that the correct number of layers are loaded.

In addition, I removed the conditional statement so that the same code is executed
when the value of lookahead is 0 and when it is not.

Signed-off-by: SeoHyungjun [email protected]

model_graph.LoadTensors(f);
}
if (f != 0 && lookahead != 0)
model_graph.LoadTensors(f);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for lookahead = 0 case (on demand)
doesn't we need this code ?

else {
          model_graph.LoadTensors(f);
        }

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the condition Lookahead != 0.

Previously, more layers were loaded into memory than the value of
lookahead. I modified the code so that the correct number of layers
are loaded.

In addition, I removed the conditional statement so that the same
code is executed when the value of lookahead is 0 and when it is not.

Signed-off-by: SeoHyungjun <[email protected]>
Added last_order to manager. last_order stores the last number
loaded previously. Modified the logic to load only those that were
not previously loaded by using last_order when requesting LoadTensor.

Signed-off-by: SeoHyungjun <[email protected]>
@SeoHyungjun
Copy link
Member Author

There is a problem when the lookahead is 0 in the current code.
Confirmation is required.

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

Successfully merging this pull request may close these issues.

2 participants