-
Notifications
You must be signed in to change notification settings - Fork 0
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
Modify BeamSearchBatchConfig to Support General Tree Structure. #13
Comments
I remember that we cannot use vector here since this data struct will be sent to GPU. That's the reason we use preallocated arrays for everything. Correct me if I am wrong. |
I see. Thanks for pointing this out! If you still remember it, could you please find the code to pass the data structure to GPU? |
The data structure is automatically memcpy'd from CPU's address space to GPU's address space. Therefore, using any stl data structure is problematic since |
You should replace vectors with arrays in the data structure |
Okay, that make sense. It seems that if we preallocate the array, we have to set the size of the arrays in |
Does the following look good? Btw, which one is the budget,
|
|
Thanks for the comment. Is |
It should be the budget for single request. The entire batch should be |
This issue is opened to discuss the plan to modify
BeamSearchBatchConfig
To support general tree structures. As this data structure is related to many on-going projects, we want to make sure that the change to it won't block others' development.The current
BeamSearchBatchConfig
class is as follows:Several redundant member variables and methods are listed as follows. Please take a look at them since the redundancy of some of them may need further verify:
beam_width
: we need to remove this since we want to support general tree structures.target_iterations
: not used.current_iteration
: not used.sub_requests
: not used.done
: not used.MAX_BEAM_WIDTH
: remove to support general tree structures.MAX_BEAM_DEPTH
: remove to support general tree structures.MAX_SPECULATIVE_TREE_BRANCHES
: remove to support general tree structures.BeamSearchPerRequestInfo::beam_size
,BeamSearchPerRequestInfo::max_depth
andBeamSearchPerRequestInfo::sub_request_num
: remove to support general tree structures.The proposed new data structure to substitute
BeamSearchBatchConfig
is as follows:All the arrays are replaced with
vector
, please let us know if that could cause a problem.The text was updated successfully, but these errors were encountered: