History log of /llvm-project/flang/lib/Semantics/check-cuda.cpp (Results 1 – 24 of 24)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init
# 3d59e30c 23-Jan-2025 Valentin Clement (バレンタイン クレメン) <clementval@gmail.com>

[flang][cuda] Allow DO CONCURRENT in cuf kernel (#124190)


# 4065d985 23-Jan-2025 Valentin Clement (バレンタイン クレメン) <clementval@gmail.com>

[flang][cuda] Allow complex type in cuf kernel reduce (#124185)


Revision tags: llvmorg-19.1.7
# e3dafa88 04-Jan-2025 Valentin Clement (バレンタイン クレメン) <clementval@gmail.com>

[flang][cuda] Allow GOTO, EXIT, CYCLE and SELECT CASE in device procedures (#121612)


# 7009b069 19-Dec-2024 Valentin Clement (バレンタイン クレメン) <clementval@gmail.com>

[flang][cuda] Allow STOP in device context (#120625)

STOP statement is allowed in device procedure


# 81333cfc 18-Dec-2024 Valentin Clement (バレンタイン クレメン) <clementval@gmail.com>

[flang][cuda] Relax host array check for cuda constant (#120333)

Array with CONSTANT attribute declared in module spec part are device
arrays and should not trigger the host array check.


# 15c61a20 17-Dec-2024 Valentin Clement (バレンタイン クレメン) <clementval@gmail.com>

[flang][cuda] Do not consider SHARED array as host array (#120306)

Update the current `FindHostArray` to not return shared array as host
array.


# 97b7bace 17-Dec-2024 Valentin Clement (バレンタイン クレメン) <clementval@gmail.com>

[flang][cuda] Allow host array with PARAMETER attribute in device context (#120298)

Host arrays are normally not allowed in device context unless they have
a `PARAMETER` attribute. This patch updat

[flang][cuda] Allow host array with PARAMETER attribute in device context (#120298)

Host arrays are normally not allowed in device context unless they have
a `PARAMETER` attribute. This patch update the check so no error is
emitted.

show more ...


Revision tags: llvmorg-19.1.6
# 67ae944b 16-Dec-2024 Valentin Clement (バレンタイン クレメン) <clementval@gmail.com>

[flang][cuda] Check for use of host array in device context (#119756)

Now that variables have implicit attribute, we can check for illegal use
of module host variable in device context.


Revision tags: llvmorg-19.1.5
# 73216cd7 20-Nov-2024 Peter Klausler <pklausler@nvidia.com>

[flang] Rework CUDA kernel DO host array check (#116301)

Don't worry about derived type components unless they are pointers or
allocatables.


Revision tags: llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2
# 0f973ac7 02-Oct-2024 Peter Klausler <pklausler@nvidia.com>

[flang] Tag warnings with LanguageFeature or UsageWarning (#110304)

(This is a big patch, but it's nearly an NFC. No test results have
changed and all Fortran tests in the LLVM test suites work as

[flang] Tag warnings with LanguageFeature or UsageWarning (#110304)

(This is a big patch, but it's nearly an NFC. No test results have
changed and all Fortran tests in the LLVM test suites work as expected.)

Allow a parser::Message for a warning to be marked with the
common::LanguageFeature or common::UsageWarning that controls it. This
will allow a later patch to add hooks whereby a driver will be able to
decorate warning messages with the names of its options that enable each
particular warning, and to add hooks whereby a driver can map those
enumerators by name to command-line options that enable/disable the
language feature and enable/disable the messages.

The default settings in the constructor for LanguageFeatureControl were
moved from its header file into its C++ source file.

Hooks for a driver to use to map the name of a feature or warning to its
enumerator were also added.

To simplify the tagging of warnings with their corresponding language
feature or usage warning, to ensure that they are properly controlled by
ShouldWarn(), and to ensure that warnings never issue at code sites in
module files, two new Warn() member function templates were added to
SemanticsContext and other contextual frameworks. Warn() can't be used
before source locations can be mapped to scopes, but the bulk of
existing code blocks testing ShouldWarn() and FindModuleFile() before
calling Say() were convertible into calls to Warn(). The ones that were
not convertible were extended with explicit calls to
Message::set_languageFeature() and set_usageWarning().

show more ...


Revision tags: llvmorg-19.1.1, llvmorg-19.1.0
# cfc09511 06-Sep-2024 Valentin Clement (バレンタイン クレメン) <clementval@gmail.com>

[flang][cuda] Do not check assignment semantic in cuf kernel (#107512)


Revision tags: llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2
# 16975ad2 26-Jul-2024 Valentin Clement (バレンタイン クレメン) <clementval@gmail.com>

[flang][cuda] Emit error when host array is used in CUF kernel (#100693)

Restriction from the standard 2.11.2.

Arrays used or assigned in the loop must have the device, managed or
unifed attribu

[flang][cuda] Emit error when host array is used in CUF kernel (#100693)

Restriction from the standard 2.11.2.

Arrays used or assigned in the loop must have the device, managed or
unifed attribute.

show more ...


Revision tags: llvmorg-19.1.0-rc1, llvmorg-20-init
# 8e8dccde 19-Jun-2024 Valentin Clement (バレンタイン クレメン) <clementval@gmail.com>

[flang][cuda] Do not consider PINNED as device attribute (#95988)

PINNED is a CUDA data attribute meant for the host variables. Do not
consider it when computing the number of device variables in a

[flang][cuda] Do not consider PINNED as device attribute (#95988)

PINNED is a CUDA data attribute meant for the host variables. Do not
consider it when computing the number of device variables in assignment
for the cuda data transfer.

show more ...


Revision tags: llvmorg-18.1.8, llvmorg-18.1.7
# 3af717d6 30-May-2024 khaki3 <47756807+khaki3@users.noreply.github.com>

[flang] Add parsing of DO CONCURRENT REDUCE clause (#92518)

Derived from #92480. This PR supports parsing of the DO CONCURRENT
REDUCE clause in Fortran 2023. Following the style of the OpenMP parse

[flang] Add parsing of DO CONCURRENT REDUCE clause (#92518)

Derived from #92480. This PR supports parsing of the DO CONCURRENT
REDUCE clause in Fortran 2023. Following the style of the OpenMP parser
in MLIR, the front end accepts both arbitrary operations and procedures
for the REDUCE clause. But later Semantics can notify type errors and
resolve procedure names.

show more ...


Revision tags: llvmorg-18.1.6
# 5bbb63bd 15-May-2024 Peter Klausler <35819229+klausler@users.noreply.github.com>

[flang] Parse REDUCE clauses in !$CUF KERNEL DO (#92154)

A !$CUF KERNEL DO directive is allowed to have advisory REDUCE clauses
similar to those in OpenACC and DO CONCURRENT. Parse and represent th

[flang] Parse REDUCE clauses in !$CUF KERNEL DO (#92154)

A !$CUF KERNEL DO directive is allowed to have advisory REDUCE clauses
similar to those in OpenACC and DO CONCURRENT. Parse and represent them.
Semantic validation will follow.

show more ...


# 38b27559 11-May-2024 Valentin Clement (バレンタイン クレメン) <clementval@gmail.com>

Revert "[flang][cuda] Implicitly load cudadevice module in device/global subprogram" (#91827)

Reverts llvm/llvm-project#91668


# f32f6d19 10-May-2024 Valentin Clement (バレンタイン クレメン) <clementval@gmail.com>

[flang][cuda] Implicitly load cudadevice module in device/global subprogram (#91668)

Some functions and subroutines are available in device context
(device/global). These functions have interfaces

[flang][cuda] Implicitly load cudadevice module in device/global subprogram (#91668)

Some functions and subroutines are available in device context
(device/global). These functions have interfaces declared in the
`cudadevice` module.

This patch adds interfaces as `__cuda_device_builtins_<fctname>` in a
builtin module and they are USE'd rename in the `cudadevice` module. The
module is implicitly used in device/global subprograms.

The builtin module only contains procedures from section 3.6.4 for now.

show more ...


Revision tags: llvmorg-18.1.5
# 505f6da1 01-May-2024 Peter Klausler <35819229+klausler@users.noreply.github.com>

[flang] Ensure all warning/portability messages are guarded by Should… (#90518)

…Warn()

Many warning messages were being emitted unconditionally. Ensure that
all warnings are conditional on a tr

[flang] Ensure all warning/portability messages are guarded by Should… (#90518)

…Warn()

Many warning messages were being emitted unconditionally. Ensure that
all warnings are conditional on a true result from a call to
common::LanguageFeatureControl::ShouldWarn() so that it is easy for a
driver to disable them all, or, in the future, to provide per-warning
control over them.

show more ...


# a309c07a 19-Apr-2024 Valentin Clement (バレンタイン クレメン) <clementval@gmail.com>

[flang][cuda] Allow if stmt in device subroutine (#89347)


# 26101e8c 17-Apr-2024 Valentin Clement (バレンタイン クレメン) <clementval@gmail.com>

[flang][cuda] Avoid crash by exiting the check if assignment is not usable (#89149)

In the presence of other semantic error, `GetAssignment` would return a
nullptr and therefore would make the rest

[flang][cuda] Avoid crash by exiting the check if assignment is not usable (#89149)

In the presence of other semantic error, `GetAssignment` would return a
nullptr and therefore would make the rest of the check crash when trying
to collect symbols.

Exiting early when we have a nullptr so the compiler doesn't crash and
user can get the meaningful semantic error.

show more ...


Revision tags: llvmorg-18.1.4
# 7b6b0231 12-Apr-2024 Valentin Clement (バレンタイン クレメン) <clementval@gmail.com>

[flang][cuda] Fix crash in semantic (#88577)

Fix for #88451

Do not perform semantic check about data transfer on assignment
statement in device context.


# 896b5e55 08-Apr-2024 Valentin Clement (バレンタイン クレメン) <clementval@gmail.com>

[flang][cuda] Allow list-directed PRINT and WRITE stmt in device code (#87415)

The specification allow list-directed PRINT and WRITE statements to
appear in device code. This patch relax the semant

[flang][cuda] Allow list-directed PRINT and WRITE stmt in device code (#87415)

The specification allow list-directed PRINT and WRITE statements to
appear in device code. This patch relax the semantic check to allow
them.

3.6.11.
List-directed PRINT and WRITE statements to the default unit may be used
when compiling for compute capability 2.0 and higher; all other uses of
PRINT and WRITE are disallowed.

show more ...


# 0aa982fb 05-Apr-2024 Valentin Clement (バレンタイン クレメン) <clementval@gmail.com>

[flang][cuda] Add restriction on implicit data transfer (#87720)

In section 3.4.2, some example of illegal data transfer using expression
are given. One of it is when multiple device objects are pa

[flang][cuda] Add restriction on implicit data transfer (#87720)

In section 3.4.2, some example of illegal data transfer using expression
are given. One of it is when multiple device objects are part of an
expression in the rhs. Current implementation allow a single device
object in such case. This patch adds a similar restriction.

show more ...


Revision tags: llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4
# f674ddc1 06-May-2023 Peter Klausler <pklausler@nvidia.com>

[flang] CUDA Fortran - part 5/5: statement semantics

Canonicalize !$CUF KERNEL DO loop nests, similar to OpenACC/OpenMP
canonicalization. Check statements and expressions in device contexts
for usa

[flang] CUDA Fortran - part 5/5: statement semantics

Canonicalize !$CUF KERNEL DO loop nests, similar to OpenACC/OpenMP
canonicalization. Check statements and expressions in device contexts
for usage that isn't supported. Add more tests, and include some
tweaks to standard modules needed to build CUDA Fortran modules.

Depends on https://reviews.llvm.org/D150159,
https://reviews.llvm.org/D150161, https://reviews.llvm.org/D150162, &
https://reviews.llvm.org/D150163.

Differential Revision: https://reviews.llvm.org/D150164

show more ...