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

Backports release 1.11 #53790

Merged
merged 23 commits into from
Apr 9, 2024
Merged

Backports release 1.11 #53790

merged 23 commits into from
Apr 9, 2024

Conversation

KristofferC
Copy link
Sponsor Member

@KristofferC KristofferC commented Mar 20, 2024

Backported PRs:

Non-merged PRs with backport label:

jishnub and others added 12 commits March 20, 2024 14:29
Also, simplifies the docstring by splitting the usage into two lines.

(cherry picked from commit 0b1587c)
…#53776)

When multiple threads concurrently attempt to compile the same method,
`--trace-compile` could emit duplicate `precompile` statements. This
small tweak eliminates one source of these duplicates.

Backported to 1.10 from #53774.

(cherry picked from commit f6a3c5f)
~~Apparently somewhere in codegen inside `emit_codeinst`some piece of
code is relying on the implicit try catch gcstack restoring. I haven't
got the analyzer working on that file yet (it has hundreds of issues and
it doesn't like C++ code that much + the file is tens of thousands of
lines after includes so it struggles).~~

This fixes the compileall segfault in apple-aarch64 ci.
#53811

(cherry picked from commit 52fc796)
Currently it's a bit excessive in the `Pkg.test` precompile job

![Screenshot 2024-03-20 at 12 04
03 PM](https://github.com/JuliaLang/julia/assets/1694067/7600f0b8-6e4b-43b2-9c42-c8d5d16b8d57)

This PR
```
Precompiling project for configuration --code-coverage=none --color=yes --check-bounds=yes --warn-overwrite=yes --depwarn=yes --inline=yes --startup-file=no --track-allocation=none...
    354.9 ms  ✓ RFFT
  1 dependency successfully precompiled in 1 seconds. 38 already precompiled.
```

Pkg could also just set the non-default flags to minimize the list.

(cherry picked from commit 9291845)
Fixes JuliaDebug/Cthulhu.jl#541 by picking up
libuv/libuv@3ecce91.

(cherry picked from commit 5ed51d3)
MPFR 4.2.1 was released on 22 August 2023.
It contains bugfixes.

(cherry picked from commit 61caaa8)
…3383)

With this, the following (and equivalent calls) work:
```julia
julia> copyto!(view(zeros(BigInt, 2), 1:2), Vector{BigInt}(undef,2))
2-element view(::Vector{BigInt}, 1:2) with eltype BigInt:
 #undef
 #undef

julia> copyto!(view(zeros(BigInt, 2), 1:2), view(Vector{BigInt}(undef,2), 1:2))
2-element view(::Vector{BigInt}, 1:2) with eltype BigInt:
 #undef
 #undef
```

Close #53098. With this, all
the `_unsetindex!` branches in `copyto_unaliased!` work for
`Array`-views, and this makes certain indexing operations vectorize and
speed-up:
```julia
julia> using BenchmarkTools

julia> a = view(rand(100,100), 1:100, 1:100); b = view(similar(a), axes(a)...);

julia> @Btime copyto!($b, $a);
  16.427 μs (0 allocations: 0 bytes) # master
  2.308 μs (0 allocations: 0 bytes) # PR
```

Improves (but doesn't resolve)
#40962 and
#53158

```julia
julia> a = rand(40,40); b = rand(40,40);

julia> @Btime $a[1:end,1:end] .= $b;
  5.383 μs (0 allocations: 0 bytes) # v"1.12.0-DEV.16"
  3.194 μs (0 allocations: 0 bytes) # PR
```
ƒ
Co-authored-by: Jameson Nash <[email protected]>

(cherry picked from commit 1a90409)
These had been copy-pasted incorrectly, and should throw an error if the
indices are out of bounds.

(cherry picked from commit 98b3f72)
@KristofferC
Copy link
Sponsor Member Author

@nanosoldier runtests(["UsingMerge", "ScoredTests", "TextWrap", "StructIO", "MetadataStreams", "PrecompileMacro", "Undefs", "Exceptions", "CachedFunctions", "NumericIO", "LLVMLoopInfo", "LicenseGrabber", "DynamicallyLoadedEmbedding", "ConcreteTupleDicts", "EnumX", "PropertyDicts", "ProtoStructs", "BitFlags", "ExternalDocstrings", "WidthLimitedIO", "DataBags", "TwoDimensional", "PairedLinkedLists", "Expect", "Ramps", "Elliptic", "BayesHistogram", "FlagSets", "HierarchicalMatrices", "Why", "ClimateEasy", "TestExtras", "TrueSkillThroughTime", "AutoHashEquals", "MetaUtils", "ScopedValues", "Microgrids", "CubicSplines", "TypeUtils", "TestItemDetection", "SentinelViews", "ParallelProcessingTools", "Lebedev", "StructTypes", "StableLinearAlgebra", "Kirei", "Checkerboard", "NeighborJoining", "Bobby", "DynamicObjects", "Memoize", "StaticNumbers", "SimpleIntegrals", "CompositeStructs", "SaferIntegers", "DiracNotation", "Bessels", "Preferences", "RecursiveDicts", "Chairmarks", "Emojify", "ConstructionBase", "NormalHermiteSplines", "DateFormats", "Skipper", "RandomNumbers", "LogSpline", "StructuredArrays", "Maxvol", "ROCCurves", "DataPipes", "LazyGrids", "JuliaWorkspaces", "Hygienic", "RegularizedCovarianceMatrices", "CompileTraces", "SPGBox", "EnsembleInversion", "SwapStreams", "NativeNaNMath", "LoopFieldCalc", "YoungTableaux", "DynamicSparseArrays", "Match", "XAIBase", "SubspacePreservingSparsification", "EasyJobsBase", "InvertedIndices", "PyFormattedStrings", "TypedSyntax", "LoweredCodeUtils", "SIMDscan", "Resizing", "Umlaut", "PlutoVSCodeDebugger", "PlutoHooks", "StructEquality", "PreferenceTools", "DictTools", "StaticStrings", "RegistryTools", "StandardPacked", "PDMats", "ProperOrthogonalDecomposition", "ScanByte", "IterationControl", "SqraCore", "TestItemRunner", "ChunkSplitters", "AhoCorasickAutomatons", "ExtendedKronigPennyMatrix", "IntensityMetrics", "UInt12Arrays", "OpenTelemetryAPI", "LibLZO", "GZip", "TopoChains", "Unitful", "NamedColors", "ZipFile", "TerminalRegressionTests", "JSONRPC", "ConvolutionOperators", "Aqua", "QuadGK", "FastRunningMedian", "AesKeywrapNettle", "Inertia", "QMDDocTools", "Reactive", "RootsAndPoles", "MicroMamba", "DecisionTree", "ProtoBuf", "DataStructures", "ConstraintCommons", "Classes", "PropCheck", "TableShowUtils", "CodeTools", "SequentialMonteCarlo", "CodecBGZF", "UnitTypes", "MaybeInplace", "REPLference", "ColPack", "UnionCollections", "RetroCap", "Darknet", "DocumentationOverview", "ObjectOriented", "LocalRegistry", "FillArrays", "Accessors", "MuJoCo", "HalfEdges", "UProbes", "LLVMCGUtils", "CloseOpenIntervals", "StaticArrayInterface", "PDMatsExtras", "SourceWalk", "InteractiveErrors", "IntervalSets", "LLVM", "VimBindings", "BSDiff", "DiffEqDiffTools", "NodeCall", "OMEinsumContractionOrders", "CellArrays", "XUnit", "Countries", "LACosmic", "CloughTocher2DInterpolation", "Revise", "HomogeneousTransformations", "LasIO", "MaxPlus", "Krylov", "PosteriorDB", "ArrayInterfaceBlockBandedMatrices", "IntervalUnions", "NamedArrays", "RootedTrees", "ManifoldsBase", "KissSmoothing", "StationXML", "MCPhyloTree", "BlockDiagonals", "GPUCompiler", "VariantCallFormat", "StableHashTraits", "Comonicon", "EvolutionaryModelingTools", "CondaPkg", "PandasJSON", "HypertextTemplates", "SemiseparableMatrices", "MutableArithmetics", "AllocCheck", "LogDensityProblemsAD", "SimpleWorkflows", "Polylogarithms", "SimpleConfig", "Caching", "SQLiteDF", "ImageCore", "Metaheuristics", "MolecularMinimumDistances", "PSIS", "CategoricalArrays", "SparsityTracing", "WriteVTK", "CamiFITS", "Distances", "FunctionProperties", "GNSSDecoder", "QuasiArrays", "Rotations", "LinearFold", "InterferometricModels", "ThreadedSparseCSR", "Ewalder", "FunnyORM", "DataInterpolations", "LongDatasetSort", "SparseIR", "CellListMap", "Compose", "ImageShow", "CartesianJoin", "BigWig", "Merly", "GoogleSheetsCSVExporter", "Metis", "BandedMatrices", "PlutoVista", "HTTP", "BertWordPieceTokenizer", "RecursiveArrayTools", "KernelAbstractions", "BasicBSpline", "ManifoldDiff", "Interpolations", "FixedWidthTables", "RelationalDatasets", "DLMReader", "Electrum", "Peridynamics", "ProbabilisticRoadMap", "Graphs", "LinearMaps", "DirectSearch", "AprilTags", "AsterReader", "OMEinsum", "QEDbase", "DynamicExpressions", "DataDeps", "FiniteDiff", "Colab", "HDF5", "LokiLogger", "ExcelReaders", "DynamicPolynomials", "BlockBandedMatrices", "DictArrays", "BSeries", "DirectionalStatistics", "ServerMetrics", "DTALib", "LanguageServer", "CDCLsat", "HTTPDownloads", "AppliGeneralLedger", "DateSelectors", "AutoBZCore", "MonteCarloTesting", "Skans", "ExaModels", "PeriodicSchurDecompositions", "Mangal", "WebAssemblyCompiler", "MultivariateStats", "VoronoiCells", "DiffusionMap", "DensityRatioEstimation", "GraphPlot", "PartitionedStructures", "DataManipulation", "MAT", "MultiAgentPathFinding", "PlutoTables", "TimeStruct", "PlutoUIExtra", "GCPDecompositions", "TransformVariables", "ImageMagick", "TypedPolynomials", "QuadraticHamiltonians", "BigBed", "FastTransformsForwardDiff", "RAFF", "PDBTools", "FLoops", "CCBlade", "ReadStatTables", "PatternFolds", "VisionHeatmaps", "ImplicitDifferentiation", "Feather", "ADIOS2", "RectiGrids", "TwoFAST", "InMemoryDatasets", "BioCCP", "NetCDF", "GenomicAnnotations", "GPUArrays", "WeibullParetoDist", "InferenceObjects", "Transducers", "ImplicitGlobalGrid", "FactorRotations", "LazyBandedMatrices", "Manopt", "StandardizedPredictors", "MondrianForests", "NLPModelsTest", "ProteinSecondaryStructures", "JunctionTrees", "CloudStore", "VOTables", "MultiPrecisionArrays", "Ghost", "MetalKernels", "SlackThreads", "SeparableFunctions", "ElectroPhysiology", "SQLStore", "MathTeXEngine", "MLJScikitLearnInterface", "TrajectoryOptimization", "SpineBasedRecordLinkage", "WilliamsonTransforms", "InfiniteArrays", "OutlierDetectionPython", "GaussianRandomFields", "HypothesisTests", "SingularSpectrumAnalysis", "Materials", "Vega", "HiddenMarkovModels", "PressureSensitiveMats", "Checkpointing", "NISTStatisticalReferenceData", "AnovaGLM", "Subspaces", "GeneralizedPhase", "Pitaya", "FMIImport", "NaNStatistics", "TensorBoardLogger", "FastDifferentiation", "VegaLite", "OptimizationMetaheuristics", "Intervals", "Legolas", "QuantumControl", "RecursiveFactorization", "AlgebraOfNNs", "SamplingRB", "Chevie", "Shapefile", "CVaRRiskParity", "KomaMRIBase", "ConstraintDomains", "StaticTools", "RData", "ODEConvergenceTester", "IERSConventions", "DatagenCopulaBased", "PlutoStyles", "CaNNOLeS", "AbstractGPs", "GroupedTransforms", "RestrictedBoltzmannMachines", "SunAsAStar", "Onda", "NaiveNASlib", "LegolasFlux", "GraphRecipes", "ContinuumArrays", "Thermochron", "GaussianMixtureRegressions", "Acquisition", "QUBOConstraints", "PlantRayTracer", "Distributions", "ClimaAnalysis", "RedBlackGraph", "NCRegressionTests", "JupyterPlutoConverter", "Arrow", "TransitionMatrices", "ImageNoise", "LightOSM", "KomaMRIFiles", "PseudoPotentialIO", "Groebner", "TimeDag", "FixedEffectModels", "Layered", "JuMP", "DistanceTransforms", "Copulas", "COPT", "ForecastData", "HiGHS", "GaussianMixtures", "ANOVAapprox", "MosekTools", "Gen", "Quantikz", "TuringCallbacks", "ProximalAlgorithms", "EasyFit", "STREAMBenchmark", "AcousticAnalogies", "VirtualObservatory", "ChowLiuTrees", "ClinicalTrialUtilities", "CUDAKernels", "SmoQyDQMC", "IndexSpaces", "ChaChaCiphers", "COSMO", "Clarabel", "CompositionalNetworks", "Trading", "CoulombIntegrals", "StaticCompiler", "QuasinormalModes", "CoinbasePro", "Meshes", "BioFetch", "AutoMLPipeline", "PlmDCA", "NormalizingFlows", "OptimizationPRIMA", "UnitCommitment", "DiffOpt", "NLPModelsJuMP", "NeuralNetworkReachability", "Robotlib", "SkyDomes", "AdvancedMH", "StochasticAD", "AlphaStableDistributions", "QUBOTools", "Tulip", "NaiveBayes", "ImageMorphology", "MatrixEnsembles", "StateSpaceInference", "ComplexityMeasures", "ExplainableAI", "ExtremeStats", "Catlab", "HierarchicalTemporalMemory", "NURBS", "PointEstimateMethod", "MEstimation", "MeasureTheory", "SampleChains", "PlanktonIndividuals", "Optim", "SymArrays", "TensorCast", "MLJLinearModels", "Constraints", "HurdleDMR", "HarmonicOrthogonalPolynomials", "ConstraintSolver", "PowerModelsDistribution", "TSFrames", "TemporalGPs", "CalibrationErrors", "Parquet2", "Polyhedra", "ExaPF", "GroupedErrors", "PolyJuMP", "GaussianBasis", "MPSGE", "SingularIntegrals", "UKCarbonIntensityData", "ParticleCorrelations", "AnnuliOrthogonalPolynomials", "SemiclassicalOrthogonalPolynomials", "ChaoticDynamicalSystemLibrary", "DyadicKDE", "EquilibratedFlux", "HOODESolver", "GraphSignals", "PiecewiseOrthogonalPolynomials", "ODEInterfaceDiffEq", "MLJOpenML", "QMDP", "NoncommutativeGraphs", "PowerModelsAnalytics", "StatisticalGraphics", "ThermodynamicIntegration", "SeisBase", "SSIMLoss", "ApproximateVI", "MolSimToolkit", "GtkReactive", "DroneSurveillance", "Packmol", "OptimalTransport", "LSODA", "WiSER", "MultivariateOrthogonalPolynomials", "SimSpread", "TracyWidomBeta", "MaximinOPF", "GLFixedEffectModels", "ExaAdmm", "ODE", "StLifeIns", "OceanWaveSpectralFitting", "RadialPiecewisePolynomials", "RockSample", "ReplicateBE", "BulkLMM", "Sundials", "ModeCouplingTheory", "TableTransforms", "ClassicalOrthogonalPolynomials", "Winston", "Tabulae", "WhittleLikelihoodInference", "NoiseRobustDifferentiation", "AlgebraicCurveOrthogonalPolynomials", "BasicBSplineExporter", "TestParticle", "QuantumStateBase", "EvidentialFlux", "KeplerGL", "GeoParquet", "ReferenceFiniteElements", "SymbolicRegression", "NonconvexMetaheuristics", "EnsembleKalmanProcesses", "PlotSeis", "FluxPrune", "ApproxFunSingularities", "PlotMesh", "FluxExtra", "LiteQTL", "AlgebraicPetri", "PhyloNetworks", "MPIFiles", "SparseKmeansFeatureRanking", "EconomicScenarioGenerators", "JOLI", "AugmentedGPLikelihoods", "PosteriorStats", "GADM", "DCEMRI", "QuantumStateDistributions", "EDM4hep", "IncrementalPruning", "BridgeDiffEq", "CherenkovDeconvolution", "SpinGlassPEPS", "TransitionsInTimeseries", "WordCloud", "VLBIImagePriors", "NestedSamplers", "BVHFiles", "ARCHModels", "TimeseriesTools", "PlotRNA", "RelevancePropagation", "OpenADMIXTURE", "PLaplace", "GreedyAlign", "EvoTrees", "MCMCTempering", "QXContexts", "KomaMRIPlots", "JetPack", "PlutoStaticHTML", "MITgcmTools", "SignedDistanceFunction", "DynACof", "Alexya", "TimeSeriesClassification", "TeneT", "Variography", "GeoStatsFunctions", "PoreMatMod", "FastaLoader", "Yields", "NablaNet", "PlutoPages", "KnetNLPModels", "Knet", "MLJBalancing", "Braket", "GlobalSensitivity", "QuantumInformation", "SFrontiers", "ElasticSurfaceEmbedding", "Surrogates", "ChemistryFeaturization", "SetIntersectionProjection", "TransformerBlocks", "PottsGumbelRBMLayers", "SMLMBoxer", "QuantumOpticsBase", "AztecDiamonds", "Swalbe", "GumbelSoftmax", "KomaMRICore", "YAXArrays", "IPMeasures", "InferOpt", "GraphNetCore", "QuantitativeSusceptibilityMappingTGV", "PortfolioOpt", "DistributedStwdLDA", "DeepUnfoldedCDLMotif", "Wflow", "SimDNA", "DistributedFlux", "UNet", "Tsunami", "FinanceModels", "MetidaCu", "Hyperelastics", "BackgroundSubtraction", "Hopfields", "TrajOptPlots", "REoptLite", "SurrogatesFlux", "ZonalFlow", "SchwarzChristoffel", "OperatorLearning", "Korg", "IRKGaussLegendre", "DynamicalSystemsBase", "SampleChainsDynamicHMC", "ParallelStencil", "Imbalance", "MIRT", "GeoStatsProcesses", "Mehrotra", "PALEOaqchem", "PALEOcopse", "LLMTextAnalysis", "GeometryOptimization", "BEAST", "ActuaryUtilities", "MultiStateSystems", "GeneralizedSDistributions", "MimiMooreEtAlAgricultureImpacts", "Symbolics", "NBodySimulator", "HierarchicalEOM", "SoleData", "KnetLayers", "ReinforcementLearningCore", "EFTfitter", "EMpht", "UltraDark", "DistributedFactorGraphs", "ImageQuilting", "MriResearchTools", "LaplaceRedux", "MatrixProductBP", "Flux3D", "GeoStatsTransforms", "KiteModels", "DelayDiffEq", "ReachabilityAnalysis", "ConstrainedSystems", "LITS", "NonlinearSchrodinger", "MatrixMerge", "VisualizeMotifs", "FractionalSystems", "DifferentiableTrajectoryOptimization", "CDLmotif", "PartiallySeparableSolvers", "Grumps", "IndividualDisplacements", "RAPIDS", "ReinforcementLearning", "DINCAE", "Consensus", "GenericTensorNetworks", "FSimBase", "PotentialFlow", "BAT", "ColorSchemeTools", "EffectiveWaves", "MOTIFs", "SystemBenchmark", "PlantBiophysics", "HydroPowerSimulations", "ConstraintLearning", "ImageUtils", "EqualitySampler", "ObjectDetector", "PositionVelocityTime", "Fronts", "TrajGWAS", "Mikrubi", "Juice", "OrdinalGWAS", "GeometricProblems", "Futbolista", "PlotPlants", "Plots", "AllenNeuropixelsBase", "SeisPDF", "HighDimPDE", "TensorInference", "ITensorUnicodePlots", "ControlSystemIdentification", "AcousticRayTracers", "TMLE", "RomeoDFT", "DifferentiableStateSpaceModels", "LowRankIntegrators", "ActionModels", "ProcessBasedModelling", "SurfaceReactions", "SideKicks", "Knockoffs", "LocalAnisotropies", "AlgebraicInference", "SurfaceCoverage", "StirredReactor", "Pesto", "QXTools", "PixelArt", "PlugFlowReactor", "BatchReactor", "SurrogatesMOE", "QuantumAnnealing", "JointSurvivalModels", "CalibrateEmulateSample", "Tapestree", "QSimulator", "ConformalPrediction", "BaseModelica", "ScatteringOptics", "NeuronBuilder", "ODEProblemLibrary", "NEOs", "NestedEnvironments", "PolynomialGTM", "ParameterizedFunctions", "NetworkJumpProcesses", "DiffEqProblemLibrary", "NonconvexBayesian", "JumpProblemLibrary", "LinearNoiseApproximation", "BlockSystems", "SDEProblemLibrary", "YaoQX", "AdditiveCellCom", "GalacticPotentials", "IntervalConstraintProgramming", "StateSpaceReconstruction", "ReactionNetworkImporters", "ProbabilisticEchoInversion", "OpenQuantumSystems", "CellMLToolkit", "CryoGrid", "AstrodynamicalModels", "AstrodynamicalSolvers", "MinimallyDisruptiveCurves", "LatticeQCD", "GeneralizedSasakiNakamura", "EHTImages", "StochasticIntegrals", "ModelOrderReduction", "Modia", "GNSSReceiver", "Catalyst", "Bactos", "ValidatedNumerics", "DiffRaster2D", "CorrelationTrackers", "GPDiffEq", "FaultTolerantControl", "DynamicalSystems", "AstroChemistry", "ParticleMDI", "CorrelationFunctions", "TrillionDollarWords", "AtomGraphs", "GraphNets", "BarBay", "TKTDsimulations", "OptimizationMOI", "GeometricFlux", "BinomialSynapses", "SBMLToolkit", "PPLM", "MaterialReconstruction", "FMISensitivity", "ReactionSensitivity", "PQBaseCamp", "PANDA", "MakieRichText", "SymbolicNumericIntegration", "DickeModel", "ClimateTools", "AlgebraicDynamics", "Chron", "GeometricMachineLearning", "EditorsRepo", "SubsidenceChron", "FatDatasets", "AtmosphericDeposition", "CellularPotts", "TuringGLM", "GraphMakie", "CirculatorySystemModels", "CollectiveSpins", "SMLMFrameConnection", "SemanticTrajectories", "Collide", "SequentialSamplingModels", "MakiePDF", "FlowAtlas", "RMLImaging", "GeoIO", "ClimatePlots", "QuantumDynamics", "HmtArchive", "NuclearToolkit", "Vahana", "Cropbox", "WaveletsExt", "StructuredLight", "TSML", "GeoArtifacts", "DataDrivenSR", "QuantumOptics", "SDFResults", "HiQGA", "MINDFulMakie", "Population", "MDToolbox", "ParameterEstimocean", "Biofilm", "NeuralGraphPDE", "FastTabular", "Bagyo", "GeneticsMakie", "Survey", "PhyloClustering", "EnergyCommunity", "CDGRNs", "AlphaZero", "MRIsim", "BloqadeGates", "FastAI", "MiseEnPage", "MixedModelsMakie", "QuanEstimation", "PowerGraphics", "BloqadeODE", "SphereUDE", "DataDrivenLux", "Sisyphus", "NeXLSpectrum", "LighthouseFlux", "FMIFlux", "StochasticGene", "UnfoldCDL", "KiteSimulators", "BifurcationInference", "CEEDesigns", "Turkie", "REPL", "MCPTrajectoryGameSolver", "QuantumAnnealingAnalytics", "MRINavigator", "ReducedBasisMethods", "SMLMSim", "HarmonicBalance", "Chamber", "RigorousInvariantMeasures", "AdaptiveTestPlots", "Causal", "TaijaPlotting", "IterativeLearningControl", "OVERT", "RetentionParameterEstimator", "NeuroAnalysis", "RDMREopt", "RelativisticDynamics", "QuantumCollocation", "TumorGrowth", "VlasovMethods", "GIRFReco", "BondGraphs", "GasChromatographySimulator", "Controlz", "UnfoldMakie", "GasChromatographySystems", "SmartML", "QuantumSavory", "MagNav", "NTNk", "SparseArrays", "ContinuousTimePolicyGradients"], vs = ":release-1.10")

@nanosoldier
Copy link
Collaborator

The package evaluation job you requested has completed - possible new issues were detected.
The full report is available.

aviatesk and others added 11 commits April 9, 2024 00:38
Not sure why this typo didn't mess up the CI, but it looks like a clear
problem, let's correct it. I'd appreciate any idea on how to exercise
this change.

- fixes JuliaDebug/JuliaInterpreter.jl#621
Should fix #53399. I think this is the correct fix.
Makes it so you can build Julia with `USE_BINARYBUILDER=0`.

(cherry picked from commit b2e8eb2)
This PR adds a utility function `isrelocatable(pkg)` that can be used to
check if `pkg` is already precompiled and if the associated cachefile is
relocatable.

The reason to implicitly perform the `isprecompiled` check is that the
exact same computation needs to be done to find the right `.ji`.

A `pkg` is said to be relocatable if
1. all `include()` paths are relocatable (they start with `@depot`),
2. all `include_dependency()` paths are relocatable (they start with
`@depot` and `track_content=true` was used to include them).

(cherry picked from commit e9d25ca)
This reduces dynamic dispatch and makes JET happier.
Testing on v1.11:
```julia
julia> import LinearAlgebra: checksquare

julia> using JET

julia> @report_opt checksquare(rand(2,2), rand(2,2))
═════ 4 possible errors found ═════
┌ checksquare(::Matrix{Float64}, ::Matrix{Float64}) @ LinearAlgebra /cache/build/builder-amdci4-1/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/LinearAlgebra/src/LinearAlgebra.jl:307
│┌ string(::String, ::Tuple{Int64, Int64}) @ Base ./strings/io.jl:189
││┌ print_to_string(::String, ::Tuple{Int64, Int64}) @ Base ./strings/io.jl:150
│││┌ _unsafe_take!(io::IOBuffer) @ Base ./iobuffer.jl:494
││││┌ wrap(::Type{Array}, m::MemoryRef{UInt8}, l::Int64) @ Base ./array.jl:3101
│││││ failed to optimize due to recursion: wrap(::Type{Array}, ::MemoryRef{UInt8}, ::Int64)
││││└────────────────────
│││┌ print_to_string(::String, ::Vararg{Any}) @ Base ./strings/io.jl:143
││││ runtime dispatch detected: Base._str_sizehint(%17::Any)::Int64
│││└────────────────────
│││┌ print_to_string(::String, ::Vararg{Any}) @ Base ./strings/io.jl:148
││││ runtime dispatch detected: print(%59::IOBuffer, %97::Any)::Any
│││└────────────────────
│││┌ string(::String, ::Int64, ::String, ::Tuple{Int64}, ::String, ::Int64, ::String, ::Int64, ::String) @ Base ./strings/io.jl:189
││││ failed to optimize due to recursion: string(::String, ::Int64, ::String, ::Tuple{Int64}, ::String, ::Int64, ::String, ::Int64, ::String)
│││└────────────────────

julia> function checksquare(A...) # This PR
                  sizes = Int[]
                  for a in A
                      size(a,1)==size(a,2) || throw(DimensionMismatch(lazy"matrix is not square: dimensions are $(size(a))"))
                      push!(sizes, size(a,1))
                  end
                  return sizes
              end
checksquare (generic function with 2 methods)

julia> @report_opt checksquare(rand(2,2), rand(2,2))
No errors detected

```

(cherry picked from commit d505c8c)
On `1.11.0-alpha2`
Old:
```julia
@benchmark Base.dec($0x1, $0, $false)
BenchmarkTools.Trial: 10000 samples with 994 evaluations.
 Range (min … max):  33.702 ns …   4.242 μs  ┊ GC (min … max):  0.00% … 97.61%
 Time  (median):     37.626 ns               ┊ GC (median):     0.00%
 Time  (mean ± σ):   45.787 ns ± 147.794 ns  ┊ GC (mean ± σ):  14.53% ±  4.47%

    ▄▅▆▇█▇▇▅▃▃▂▂▂▁    ▁▂▁▁▁             ▁▁   ▁                 ▂
  ▄▇███████████████▇▇██████▇█▆▆▄▄▃▄▅▄▆▇████████▆▅▅▇▆▅▆▄▄▅▄▄▄▁▅ █
  33.7 ns       Histogram: log(frequency) by time      67.5 ns <

 Memory estimate: 88 bytes, allocs estimate: 3.
```
New:
```julia
BenchmarkTools.Trial: 10000 samples with 995 evaluations.
 Range (min … max):  27.538 ns …   3.397 μs  ┊ GC (min … max):  0.00% … 97.86%
 Time  (median):     30.151 ns               ┊ GC (median):     0.00%
 Time  (mean ± σ):   34.547 ns ± 105.101 ns  ┊ GC (mean ± σ):  10.37% ±  3.39%

       ▁ █▆▃  ▁
  ▂▂▃▃▅█████▆████▆▄▄▃▃▃▃▃▃▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▁▂▂▂▂▂▁▂▂▂▂▂▂▂▂▂▂▂▂▂ ▃
  27.5 ns         Histogram: frequency by time         43.8 ns <

 Memory estimate: 56 bytes, allocs estimate: 2.
```

Fixes #53950, actually now even faster than `1.10.2`.

It doesn't look like the length is ever changed and we don't return
these `StringMemory`s so this change should be fine.

(cherry picked from commit 0e59c9e)
…53975)

This reduces dynamic dispatch, and makes JET happier. Something similar
is already used in line 523.

(cherry picked from commit f7c7410)
…files (#53905)

Fixes
#53859 (comment),
which was actually fixed before in
#52346, but
#52750 undid that fix.

This PR does not directly address #53859, because I can not reproduce it
atm.

---

The `@depot` resolution logic for `include()` files is adjusted as
follows:

1. (new behavior) If the cache is not relocatable because of an absolute
path, we ignore that path for the depot search. Recompilation will be
triggered by `stale_cachefile()` if that absolute path does not exist.
Previously this caused any `@depot` tags to be not resolved and so
trigger recompilation.
2. (new behavior) If we can't find a depot for a relocatable path, we
still replace it with the depot we found from other files. Recompilation
will be triggered by `stale_cachefile()` because the resolved path does
not exist.
3. (this behavior is kept) We require that relocatable paths all resolve
to the same depot.
4. (new behavior) We no longer use the first matching depot for
replacement, but instead we explicitly check that all resolve to the
same depot. This has two reasons:
- We want to scan all source files anyways in order to provide logs for
1. and 2. above, so the check is free.
- It is possible that a depot might be missing source files. Assume that
we have two depots on `DEPOT_PATH`, `depot_complete` and
`depot_incomplete`.
If `DEPOT_PATH=["depot_complete","depot_incomplete"]` then no
recompilation shall happen, because `depot_complete` will be picked.
If `DEPOT_PATH=["depot_incomplete","depot_complete"]` we trigger
recompilation and hopefully a meaningful error about missing files is
thrown. If we were to just select the first depot we find, then whether
recompilation happens would depend on whether the first relocatable file
resolves to `depot_complete` or `depot_incomplete`.

(cherry picked from commit d8d3842)
- Make reshape and view with one based indexing on Memory produce Arrays
- delete wrap

Implements
#53552 (comment)

---------

Co-authored-by: Jameson Nash <[email protected]>
(cherry picked from commit 273d91e)
… Base.OneTo})` (#53991)

We assumed, falsely, that `length(inds) isa Int`. The length must be
convertible to an `Int` or we throw, but that conversion may need to be
explicitly performed.

Fixes #53990

CC @oscardssmith @vtjnash @odow

(cherry picked from commit e4f2124)
@KristofferC KristofferC merged commit 911b8cf into release-1.11 Apr 9, 2024
6 of 8 checks passed
@KristofferC KristofferC deleted the backports-release-1.11 branch April 9, 2024 11:47
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.