Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
loopy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Kaushik Kulkarni
loopy
Commits
554021a9
Commit
554021a9
authored
9 years ago
by
Andreas Klöckner
Browse files
Options
Downloads
Patches
Plain Diff
Make switch to turn off Fortran auto dependencies
parent
bda9425c
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
loopy/frontend/fortran/__init__.py
+3
-2
3 additions, 2 deletions
loopy/frontend/fortran/__init__.py
loopy/frontend/fortran/translator.py
+4
-2
4 additions, 2 deletions
loopy/frontend/fortran/translator.py
with
7 additions
and
4 deletions
loopy/frontend/fortran/__init__.py
+
3
−
2
View file @
554021a9
...
@@ -211,7 +211,8 @@ def parse_transformed_fortran(source, free_form=True, strict=True,
...
@@ -211,7 +211,8 @@ def parse_transformed_fortran(source, free_form=True, strict=True,
return
proc_dict
[
"
RESULT
"
]
return
proc_dict
[
"
RESULT
"
]
def
parse_fortran
(
source
,
filename
=
"
<floopy code>
"
,
free_form
=
True
,
strict
=
True
):
def
parse_fortran
(
source
,
filename
=
"
<floopy code>
"
,
free_form
=
True
,
strict
=
True
,
auto_dependencies
=
True
):
"""
"""
:returns: a list of :class:`loopy.LoopKernel` objects
:returns: a list of :class:`loopy.LoopKernel` objects
"""
"""
...
@@ -231,7 +232,7 @@ def parse_fortran(source, filename="<floopy code>", free_form=True, strict=True)
...
@@ -231,7 +232,7 @@ def parse_fortran(source, filename="<floopy code>", free_form=True, strict=True)
"
and returned invalid data (Sorry!)
"
)
"
and returned invalid data (Sorry!)
"
)
from
loopy.frontend.fortran.translator
import
F2LoopyTranslator
from
loopy.frontend.fortran.translator
import
F2LoopyTranslator
f2loopy
=
F2LoopyTranslator
(
filename
)
f2loopy
=
F2LoopyTranslator
(
filename
,
auto_dependencies
=
auto_dependencies
)
f2loopy
(
tree
)
f2loopy
(
tree
)
return
f2loopy
.
make_kernels
()
return
f2loopy
.
make_kernels
()
...
...
This diff is collapsed.
Click to expand it.
loopy/frontend/fortran/translator.py
+
4
−
2
View file @
554021a9
...
@@ -197,9 +197,11 @@ class Scope(object):
...
@@ -197,9 +197,11 @@ class Scope(object):
# {{{ translator
# {{{ translator
class
F2LoopyTranslator
(
FTreeWalkerBase
):
class
F2LoopyTranslator
(
FTreeWalkerBase
):
def
__init__
(
self
,
filename
):
def
__init__
(
self
,
filename
,
auto_dependencies
):
FTreeWalkerBase
.
__init__
(
self
)
FTreeWalkerBase
.
__init__
(
self
)
self
.
auto_dependencies
=
auto_dependencies
self
.
scope_stack
=
[]
self
.
scope_stack
=
[]
self
.
isl_context
=
isl
.
Context
()
self
.
isl_context
=
isl
.
Context
()
...
@@ -223,7 +225,7 @@ class F2LoopyTranslator(FTreeWalkerBase):
...
@@ -223,7 +225,7 @@ class F2LoopyTranslator(FTreeWalkerBase):
new_id
=
"
insn%d
"
%
self
.
insn_id_counter
new_id
=
"
insn%d
"
%
self
.
insn_id_counter
self
.
insn_id_counter
+=
1
self
.
insn_id_counter
+=
1
if
scope
.
previous_instruction_id
:
if
self
.
auto_dependencies
and
scope
.
previous_instruction_id
:
insn_deps
=
frozenset
([
scope
.
previous_instruction_id
])
insn_deps
=
frozenset
([
scope
.
previous_instruction_id
])
else
:
else
:
insn_deps
=
frozenset
()
insn_deps
=
frozenset
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment