Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deprecations on 0.6 #53

Closed
wants to merge 3 commits into from
Closed

Conversation

goretkin
Copy link
Contributor

@goretkin goretkin commented Oct 30, 2017

#50 didn't catch these

@andreasnoack
Copy link
Member

FemtoClearner will do even more if we bump the requirement to Julia 0.6. I can see that tests are failing on 0.5 so this might not be valid on 0.5. I think we should just bump the requirements.

abstract UnsafeArrayView{T,N,M} <: StridedArrayView{T,N,M}
abstract type StridedArrayView{T,N,M} <: DenseArray{T,N} end
abstract type ArrayView{T,N,M} <: StridedArrayView{T,N,M} end
abstract type UnsafeArrayView{T,N,M} <: StridedArrayView{T,N,M} end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These needs @compat on 0.5

typealias ContiguousMatrix{T} ContiguousArray{T,2}
ContiguousArray{T,N} = Union{Array{T,N}, ContiguousView{T,N}}
ContiguousVector{T} = ContiguousArray{T,1}
ContiguousMatrix{T} = ContiguousArray{T,2}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And these.

@andreasnoack
Copy link
Member

Should have pinged you. I looked into the ambiguities in #56

@goretkin
Copy link
Contributor Author

I just saw. Perfect! I wasn't sure what I was doing anyway ;)

Personally I think it's a good idea to drop 0.5.0 and use 0.6.0. Not sure who else is using this package. I'm just trying to get zero-allocation views, which will hopefully be in the next Julia release anyway.

@goretkin
Copy link
Contributor Author

How can femtobot be triggered to handle the 0.6.0 deprecations?

@goretkin goretkin closed this Oct 30, 2017
@andreasnoack
Copy link
Member

I'm just trying to get zero-allocation views, which will hopefully be in the next Julia release anyway.

I'm not so sure about that. @yuyichao Have you been doing any work on this?

@yuyichao
Copy link
Contributor

I guess you need to define "zero-allocation"....

  1. zero allocation for inline and inbounds subarrays is handled by Much more aggressive alloc_elim_pass! JuliaLang/julia#23240

  2. zero allocation for inlined but not inbounds subarrays is the next target. The currently on-going series of llvm optimization related PRs are preparation for it. There's a high chance it works only on LLVM 5.0 though.

  3. The next target would be to duplicate the llvm pass to type inference as well using the llvm pass as a template and to help figure out how to redo the IR for optimization in the type inference.

  4. zero allocation for non-inlined inbounds subarray is a completely different matter since it requires collecting escape info in type inference correctly.

2 can partially replace 1, and 3 will be a strict superset of 1.

1 or 2 should be doable for the next release. 3 and 4 are not necessarily harder given 2 but both of them are fairly big projects.

@goretkin
Copy link
Contributor Author

Thanks @yuyichao . Could you clarify what "inline" means? Does sum(@view A[:,1]) count?

@yuyichao
Copy link
Contributor

sum(@view A[:,1])

Doesn't matter. You just need all the user to be inlined.

@goretkin
Copy link
Contributor Author

What do you mean "doesn't matter"? Could you give an example of an inline usage and a not inline usage?

@yuyichao
Copy link
Contributor

yuyichao commented Oct 30, 2017

It means that the code contains no information to determine if the fun that uses the subarray is inlined or not.

@goretkin
Copy link
Contributor Author

I'm sorry, but I'm not following. I know what @inline does for function definitions and @inbounds does for array indexing. Are you talking about either of those?

@yuyichao
Copy link
Contributor

Inbounds is just the macro, yes. But inlining does not require the macro. As long as the function is inlined it is, well, inlined.....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants