Skip to content

Commit 6746e5a

Browse files
wsmosesWilliam Moses
andauthored
Further absint improvements (#2140)
* Further absint improvements * Update Project.toml --------- Co-authored-by: William Moses <[email protected]>
1 parent 30b6b2d commit 6746e5a

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

src/absint.jl

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -576,12 +576,20 @@ function abs_typeof(
576576
end
577577
end
578578
if !seen && typed_fieldcount(typ) > 0
579-
offset = offset - typed_fieldoffset(typ, lasti)
580-
typ = typed_fieldtype(typ, lasti)
581-
@assert Base.isconcretetype(typ)
582-
if !Base.allocatedinline(typ)
583-
legal = false
584-
end
579+
offset = offset - typed_fieldoffset(typ, lasti)
580+
typ = typed_fieldtype(typ, lasti)
581+
if offset == 0
582+
if !Base.allocatedinline(typ)
583+
if byref != GPUCompiler.BITS_VALUE
584+
legal = false
585+
end
586+
byref = GPUCompiler.MUT_REF
587+
end
588+
else
589+
if !Base.isconcretetype(typ) || !Base.allocatedinline(typ)
590+
legal = false
591+
end
592+
end
585593
seen = true
586594
end
587595
if !seen

src/compiler.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6177,7 +6177,7 @@ function GPUCompiler.codegen(
61776177
)
61786178
params = job.config.params
61796179
if params.run_enzyme
6180-
@assert eltype(params.rt) != Union{}
6180+
# @assert eltype(params.rt) != Union{}
61816181
end
61826182
expectedTapeType = params.expectedTapeType
61836183
mode = params.mode

0 commit comments

Comments
 (0)