Skip to content

Commit 4ce1053

Browse files
authored
Don't call parent before similar (#159)
* rm parent hack * mark two NamedDims tests broken * test on 1.8 * v0.3.5 * mark gpu test broken * skip not broken
1 parent bdf572c commit 4ce1053

File tree

5 files changed

+7
-8
lines changed

5 files changed

+7
-8
lines changed

.buildkite/pipeline.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ steps:
1616
if: build.message !~ /\[skip tests\]/
1717
timeout_in_minutes: 60
1818

19-
- label: "Julia 1.7"
19+
- label: "Julia 1.8"
2020
plugins:
2121
- JuliaCI/julia#v0.5:
22-
version: 1.7
22+
version: 1.8
2323
- JuliaCI/julia-test#v0.3: ~
2424
# - JuliaCI/julia-coverage#v0.3:
2525
# codecov: true

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "Tullio"
22
uuid = "bc48ee85-29a4-5162-ae0b-a64e1601d4bc"
33
authors = ["Michael Abbott"]
4-
version = "0.3.4"
4+
version = "0.3.5"
55

66
[deps]
77
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"

src/macro.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -848,8 +848,7 @@ function output_array(store)
848848
elseif isempty(store.arrays)
849849
:( similar(1:0, $TYP, tuple($(outaxes...))) )
850850
else
851-
# parent() is a trick to avoid a NamedDims bug
852-
:( similar(parent($(store.arrays[1])), $TYP, tuple($(outaxes...),)) )
851+
:( similar($(store.arrays[1]), $TYP, tuple($(outaxes...),)) )
853852
end
854853
if store.scalar
855854
push!(store.outex, :( local $ZED = $simex ))

test/gradients.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ end
9595

9696
ind2 = rand(1:10, 1024) # many repeats
9797
dx2 = ForwardDiff.gradient(x -> sum(@tullio y[i] := x[ind2[i]] + x[i]), rand(1024))
98-
@test dx2 _gradient(x -> sum(@tullio y[i] := x[ind2[i]] + x[i]), rand(1024))[1]
98+
@test_skip dx2 _gradient(x -> sum(@tullio y[i] := x[ind2[i]] + x[i]), rand(1024))[1]
9999

100100
ind3 = vcat(unique(rand(2:1024, 10)), 1) # many missing, no repeats, but always includes 1
101101
g3 = ForwardDiff.gradient(x -> sum(@tullio y[ind3[i]] := i^2 * x[i]), ones(size(ind3)))

test/parsing.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -602,8 +602,8 @@ end
602602
@test B == N[:,1]
603603

604604
@tullio C[j,i] := N[c=j, r=i] + 100 * (1:10)[j] avx=false
605-
@test A == C'
606-
@test dimnames(C) == (:_, :_) # similar(parent(A)) avoids a bug
605+
@test_broken A == C'
606+
@test_broken dimnames(C) == (:_, :_) # bug in similar, upstream. Work-around removed in https://github.com/mcabbott/Tullio.jl/pull/159
607607

608608
# writing
609609
@tullio M[row=i, col=j, i=1] := (1:3)[i] // (1:7)[j] avx=false

0 commit comments

Comments
 (0)