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

Deprecate functions vectorized via `@vectorize_(1|2)arg` in favor of compact broadcast syntax #17302

Merged
merged 18 commits into from Sep 4, 2016

Conversation

@Sacha0
Copy link
Member

@Sacha0 Sacha0 commented Jul 6, 2016

This PR deprecates all functions vectorized via macros vectorize_1arg and vectorize_2arg in favor of compact broadcast syntax (ref. #16285). Many non-macro-vectorized functions remain for a separate PR. Should this PR deprecate the vectorize_1arg and vectorize_2arg macros themselves alongside their usage in base? Best!

  • TODO: Vectorized functions involving dates/times. Done.
  • TODO: Prettify deprecation warnings. See #17289. Fixed in #17521.
  • TODO: Resolve issue with the last test in test/operators.jl. See #17304. Thanks @stevengj!
  • TODO: Resolve deprecation warnings issued by markdown's colwidths. @MikeInnes, how would you rewrite that line less vectorized max? My attempts broke markdown, so I imagine I don't understand the intention. Thanks!

Ref. #17265 (devectorization of functions over SparseMatrixCSCs).

@nalimilan
Copy link
Contributor

@nalimilan nalimilan commented Jul 7, 2016

+100 if we are sure this won't affect performance. I guess this depends on promote_op methods being correctly defined for all these operations/types...

@stevengj
Copy link
Member

@stevengj stevengj commented Jul 7, 2016

I feel like this is best delayed for 0.6 — it's going to lead to a huge number of deprecation warnings in packages.

@JeffBezanson
Copy link
Member

@JeffBezanson JeffBezanson commented Jul 7, 2016

I guess this depends on promote_op methods being correctly defined for all these operations/types

Indeed, the promote_op approach does not scale at all.

:airyprime, :airyai, :airyaiprime, :airybi, :airybiprime, :airy, :airyx, :besselj0, :besselj1, :bessely0, :bessely1, # base/special/bessel.jl
:cbrt, :sinh, :cosh, :tanh, :atan, :asinh, :exp, :erf, :erfc, :exp2, :expm1, :exp10, :sin, :cos, :tan, :asin, :acos, :acosh, :atanh, #=:log,=# :log2, :log10, :lgamma, #=:log1p,=# :sqrt, # base/math.jl
:abs, :abs2, :angle, :isnan, :isinf, :isfinite, # base/floatfuncs.jl
:acos_fast, :acosh_fast, :angle_fast, :asin_fast, :asinh_fast, :atan_fast, :atanh_fast, :cbrt_fast, :cis_fast, :cos_fast, :cosh_fast, :exp10_fast, :exp2_fast, :exp_fast, :expm1_fast, :lgamma_fast, :log10_fast, :log1p_fast, :log2_fast, :log_fast, :sin_fast, :sinh_fast, :sqrt_fast, :tan_fast, :tanh_fast, # base/fastmath.jl

This comment has been minimized.

@tkelman

tkelman Jul 7, 2016
Contributor

I like that these are annotated with where they came from, but should spread over multiple lines when it gets this long

@@ -294,12 +294,12 @@ include("client.jl")
include("util.jl")

# dense linear algebra
include("broadcast.jl")
importall .Broadcast

This comment has been minimized.

@tkelman

tkelman Jul 7, 2016
Contributor

probably before the linear algebra comment since broadcast is a bit more general than that

@Sacha0
Copy link
Member Author

@Sacha0 Sacha0 commented Jul 8, 2016

I feel like this is best delayed for 0.6 — it's going to lead to a huge number of deprecation warnings in packages.

Agreed. This change should wait for 0.6 for several reasons. Best!

@Sacha0 Sacha0 force-pushed the Sacha0:vectobroad branch from 5e1feef to 9d2eb9f Jul 8, 2016
@stevengj stevengj added this to the 0.6.0 milestone Jul 21, 2016
@stevengj stevengj added the broadcast label Aug 2, 2016
@stevengj
Copy link
Member

@stevengj stevengj commented Aug 2, 2016

Note that this will close #4363.

@stevengj stevengj mentioned this pull request Aug 2, 2016
5 of 17 tasks complete
@Sacha0 Sacha0 force-pushed the Sacha0:vectobroad branch 3 times, most recently from 545773a to 166c97a Aug 5, 2016
@Sacha0
Copy link
Member Author

@Sacha0 Sacha0 commented Aug 6, 2016

Rebased for 0.6 and passing CI. Nanosoldier? Best!

@musm
Copy link
Contributor

@musm musm commented Aug 6, 2016

How does this affect performance? I think a nanosoldier run could be worthwhile

@KristofferC
Copy link
Contributor

@KristofferC KristofferC commented Aug 6, 2016

There are very few benchmarks for sparse arrays in BaseBenchmarks.jl.

@Sacha0 Sacha0 changed the title WIP: Deprecate functions vectorized via `@vectorize_(1|2)arg` in favor of compact broadcast syntax Deprecate functions vectorized via `@vectorize_(1|2)arg` in favor of compact broadcast syntax Aug 7, 2016
@Sacha0
Copy link
Member Author

@Sacha0 Sacha0 commented Aug 9, 2016

@KristofferC, most functionality this pull request touches is not immediately related to sparse arrays. Conjecturing the contrary was reasonable though, given my predilections :).

@KristofferC
Copy link
Contributor

@KristofferC KristofferC commented Aug 9, 2016

@nanosoldier runbenchmarks(ALL, vs = ":master")

@nanosoldier
Copy link
Collaborator

@nanosoldier nanosoldier commented Aug 9, 2016

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @jrevels

@Sacha0 Sacha0 force-pushed the Sacha0:vectobroad branch from 166c97a to ed695e0 Aug 10, 2016
@Sacha0
Copy link
Member Author

@Sacha0 Sacha0 commented Aug 10, 2016

Rebased resolving a deprecation conflict. Prior to rebase, this PR passed both AppVeyor and Travis. Nanosoldier appears happy as well. (As @pabloferz pointed out in #17929 (comment), the lucompletepiv regressions seems unrelated.) Is this PR in good shape? Thanks!

@stevengj
Copy link
Member

@stevengj stevengj commented Aug 10, 2016

Test failure due to use of abs(x) in test/inference.jl:280.

@stevengj
Copy link
Member

@stevengj stevengj commented Aug 10, 2016

Might require some manual updates as well?

@kshyatt kshyatt added the needs docs label Aug 10, 2016
@tkelman tkelman merged commit 4533900 into JuliaLang:master Sep 4, 2016
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
vtjnash referenced this pull request Sep 5, 2016
Fix docs for isdefined
@Sacha0 Sacha0 deleted the Sacha0:vectobroad branch Sep 10, 2016
omus added a commit to JuliaTime/TimeZones.jl that referenced this pull request Sep 12, 2016
omus added a commit to JuliaTime/TimeZones.jl that referenced this pull request Sep 12, 2016
omus added a commit to JuliaTime/TimeZones.jl that referenced this pull request Nov 10, 2016
omus added a commit to JuliaTime/TimeZones.jl that referenced this pull request Nov 21, 2016
omus added a commit to JuliaTime/TimeZones.jl that referenced this pull request Mar 16, 2017
@tlienart tlienart mentioned this pull request Mar 27, 2020
0 of 113 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

You can’t perform that action at this time.