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

Assertion "indexValue >=0" failed in next_round_value_pre.lua:114 #36

Open
slowlythinking opened this issue Sep 8, 2019 · 2 comments
Open

Comments

@slowlythinking
Copy link

Hi,

When I tried to play against DeepHoldem, I got a assertion failed error. It seems i have a same problem as this issue. Here is the error:cuda runtime error (59) : device-side assert triggered at .../cutorch/lib/generic/THCTensorScatterGather.cu:268

stack trackback:

./Nn/next_round_value_pre.lua:114: in function '_card_range_to_bucket_range_on_board'
./Nn/next_round_value_pre.lua:247: in function 'get_value_aux'
./Lookahead/lookahead.lua:254: in function '_compute_terminal_equities_next_street_box'
./Lookahead/lookahead.lua:323: in function '_compute_terminal_equities'
./Lookahead/lookahead.lua:93: in function '_compute'
./Lookahead/lookahead.lua:66: in function 'resolve'
./Lookahead/resolving.lua:182: in function 'get_chance_action_cfv'
./Player/continual_resolving.lua:112: in function '_update_invariant'
./Player/continual_resolving.lua:81: in function '_resolve_node'
./Player/continual_resolving.lua:142: in function 'compute_action'
./Player/deepstack.lua:41: in main chunk

Here is the code at the error point (next_round_value_pre.lua:114):

function NextRoundValuePre:_card_range_to_bucket_range_on_board(board_idx, card_range, bucket_range)
  local other_bucket_range = bucket_range:view(-1,self.bucket_count + 1):zero()

  local indexes = self.board_indexes_scatter:view(1,self.board_count, game_settings.hand_count)[{{},board_idx,{}}]
    :expand(bucket_range:size(1), game_settings.hand_count)
  other_bucket_range:scatterAdd(
    2,
    indexes,
    card_range
      :view(-1,game_settings.hand_count)
      :expand(card_range:size(1), game_settings.hand_count))
end

I think the wrong reason is the “indexes”, because the assertion is that (THCTensorScatterGather.cu):

微信图片_20190908223829

I still can not fix it. It's been a long time since I stuck here.

Any ideas would be great. Thanks very much!

@ludwikbukowski
Copy link

I have exactly the same issue! Did you resolve it ?

@ilkkatakayama
Copy link

ilkkatakayama commented May 5, 2020

I am having the same error, anyone been able to fix this?

I compiled cutorch with the changes from DeepHoldem repo to TensorMath.lua
luarocks make rocks/cutorch-scm-1.rockspec

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

No branches or pull requests

3 participants