Skip to content

Conversation

@RezaYazdaniAminabadi
Copy link
Contributor

No description provided.

}

void GenWorkSpace(size_t size)
void GenWorkSpace(void* workspace) // (size_t size)
Copy link
Contributor

Choose a reason for hiding this comment

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

Rename it to SetWorkSpace()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks Elton, will do! :)

}

_workSpaceSize = size;
_workSpaceSize = size;*/
Copy link
Contributor

Choose a reason for hiding this comment

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

_workSpaceSize can be deleted from context class?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes agreed!

if (!_workspace) {
if (!workspace) { throw std::runtime_error("Workspace is null."); }
_workspace = workspace;
/*if (!_workspace) {
Copy link
Contributor

Choose a reason for hiding this comment

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

remove those commented code if they are useless.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have just commented them to verify that this new way is working properly, after some tests I will remove the comments

_training,
_gelu_checkpoint));

// Context::Instance().GenWorkSpace(get_workspace_size<T>(_batch_size,
Copy link
Contributor

Choose a reason for hiding this comment

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

remove it?

layer->GetNumHeads(),
layer->IsTrainingMode(),
layer->GeluCheckpoint())},
options);
Copy link
Contributor

Choose a reason for hiding this comment

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

can we use g_output.options() here instead of creating a new option?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good point 👍

@conglongli conglongli marked this pull request as ready for review January 12, 2021 21:48
Copy link
Contributor

@conglongli conglongli left a comment

Choose a reason for hiding this comment

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

Tested Bert seq512 and worked well. I think it is good to go after applying Elton's comments.

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.

4 participants