Fix pytorch storage warnings, fixes #80 (#88)

we seriously don't care what type of storage we get, pytorch sucks
This commit is contained in:
LoganDark 2023-06-03 03:09:51 -07:00 committed by GitHub
parent 3f8bb2c080
commit fb6708b555
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -84,7 +84,7 @@ class RWKVModel:
if state_in is not None:
validate_buffer(state_in, 'state_in', self._state_buffer_element_count)
state_in_ptr = state_in.untyped_storage().data_ptr()
state_in_ptr = state_in.data_ptr()
else:
state_in_ptr = 0
@ -102,8 +102,8 @@ class RWKVModel:
self._ctx,
token,
state_in_ptr,
state_out.untyped_storage().data_ptr(),
logits_out.untyped_storage().data_ptr()
state_out.data_ptr(),
logits_out.data_ptr()
)
return logits_out, state_out