cuda: in with-cuda-context, sync context when cleaning up so that destroying context doesn't fail due to asynchronous errors

db4
Joe Groff 2010-05-14 15:17:26 -07:00
parent 51c3e8a1b9
commit afdced0183
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ dim-grid dim-block shared-size stream ;
H{ } clone cuda-functions set H{ } clone cuda-functions set
[ create-context ] dip [ create-context ] dip
[ '[ _ @ ] ] [ '[ _ @ ] ]
[ drop '[ _ destroy-context ] ] 2bi [ drop '[ [ sync-context ] ignore-errors _ destroy-context ] ] 2bi
[ ] cleanup ; inline [ ] cleanup ; inline
: with-cuda-program ( flags device quot -- ) : with-cuda-program ( flags device quot -- )