Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
arraycontext
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
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
arraycontext
Commits
13304f68
Commit
13304f68
authored
2 years ago
by
Kaushik Kulkarni
Committed by
Andreas Klöckner
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Simplification: do not exit early out of freeze for 0-size arrays
Co-authored-by:
Matthew Smith
<
mjsmith6@illinois.edu
>
parent
b0d70e67
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
arraycontext/impl/pytato/__init__.py
+1
-11
1 addition, 11 deletions
arraycontext/impl/pytato/__init__.py
with
1 addition
and
11 deletions
arraycontext/impl/pytato/__init__.py
+
1
−
11
View file @
13304f68
...
...
@@ -296,17 +296,7 @@ class PytatoPyOpenCLArrayContext(_BasePytatoArrayContext):
raise
TypeError
(
f
"
{
type
(
self
).
__name__
}
.freeze invoked
"
f
"
with non-pytato array of type
'
{
type
(
array
)
}
'"
)
if
subary
.
size
==
0
:
# early exit for 0-sized arrays
key_to_frozen_subary
[
key
]
=
to_tagged_cl_array
(
cla
.
empty
(
self
.
queue
.
context
,
shape
=
subary
.
shape
,
dtype
=
subary
.
dtype
,
allocator
=
self
.
allocator
),
get_cl_axes_from_pt_axes
(
subary
.
axes
),
subary
.
tags
)
else
:
key_to_pt_arrays
[
key
]
=
subary
key_to_pt_arrays
[
key
]
=
subary
# }}}
...
...
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