File tree Expand file tree Collapse file tree 3 files changed +21
-0
lines changed Expand file tree Collapse file tree 3 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,14 @@ struct DeviceExprChecker
8282 }
8383 }
8484 }
85+ const Symbol &ultimate{sym->GetUltimate ()};
86+ const Scope &scope{ultimate.owner ()};
87+ const Symbol *mod{scope.IsModule () ? scope.symbol () : nullptr };
88+ // Allow ieee_arithmetic module functions to be called on the device.
89+ // TODO: Check for unsupported ieee_arithmetic on the device.
90+ if (mod && mod->name () == " ieee_arithmetic" ) {
91+ return {};
92+ }
8593 } else if (x.GetSpecificIntrinsic ()) {
8694 // TODO(CUDA): Check for unsupported intrinsics here
8795 return {};
Original file line number Diff line number Diff line change @@ -339,6 +339,7 @@ end subroutine ieee_get_underflow_mode_l##GKIND;
339339#define IEEE_IS_FINITE_R(XKIND) \
340340 elemental logical function ieee_is_finite_a##XKIND(x); \
341341 real (XKIND), intent (in ) :: x; \
342+ ! dir$ ignore_tkr(d) x; \
342343 end function ieee_is_finite_a##XKIND;
343344 interface ieee_is_finite
344345 SPECIFICS_R(IEEE_IS_FINITE_R)
Original file line number Diff line number Diff line change @@ -209,3 +209,15 @@ subroutine host1()
209209 a(i) = a(i) + a(j) - 34.0
210210 end do
211211end
212+
213+ subroutine ieee_test
214+ use ieee_arithmetic
215+
216+ real(8), device :: y(100)
217+ logical(4), managed :: ll(100)
218+
219+ !$cuf kernel do(1)<<<*,*>>>
220+ do i = 1, 100
221+ ll(i) = ieee_is_finite(y(i)) ! allow ieee_arithmetic functions on the device.
222+ end do
223+ end subroutine
You can’t perform that action at this time.
0 commit comments