Skip to content

Commit

Permalink
polish windows cuda bug
Browse files Browse the repository at this point in the history
  • Loading branch information
cjld committed Apr 28, 2022
1 parent 34740f9 commit eda20ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion python/jittor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# file 'LICENSE.txt', which is part of this source code package.
# ***************************************************************

__version__ = '1.3.3.13'
__version__ = '1.3.3.14'
from jittor_utils import lock
with lock.lock_scope():
ori_int = int
Expand Down
5 changes: 5 additions & 0 deletions python/jittor/src/type/common_op_type.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ unordered_map<string,string> common_op_type_cuda_map = {
{"erf", "(($1) ::erff(($2)))"},
{"erfinv", "(($1) ::erfinvf(($1)($2)))"},
{"cast", "(($1)($2))"},
#ifdef _WIN32
// windows don't have pow(float,int), cause undefined reference, fix it
{"pow", "::pow(($1)($2),($1)($4))"},
#else
{"pow", "::pow(($2),($4))"},
#endif
{"maximum", "::max($1($2), $1($4))"},
{"minimum", "::min($1($2), $1($4))"},
{"mod", "@if(@strcmp($1,float32)==0,(($2)-::floorf(($2)/($4))*($4)),@if(@strcmp(@Tx,float64)==0,(($2)-::floor(($2)/($4))*($4)),(($2)%($4))))"},
Expand Down

0 comments on commit eda20ee

Please sign in to comment.