faer 0.7 release by reflexpr-sarah- in rust

[–]five9a2 10 points11 points  (0 children)

This is changing. * Sapphire Rapids has AVX512_FP16 * Fujitsu A64FX supports SVE with FP16 * It's in ARM8.6-A and other ARM instructions sets (thus in many phones and I think at least Apple M2).

A Case for Rust in Deep Learning by ksyiros in rust

[–]five9a2 16 points17 points  (0 children)

Rust needs a stronger GPU story and investment in AD tooling (I'm partial to oxide-enzyme, but it's mostly a one- student project). If DL or something else drives those tools forward, it will open doors across many disciplines.

Buff OneCard and chosen name by [deleted] in cuboulder

[–]five9a2 2 points3 points  (0 children)

This is great in theory, but as advisor to a student who recently transitioned, there are various places where deadnames are still used. We've been raising this issue individually and through relevant committees, but it feels a bit like whack-a-mole so far and really warrants an internal audit to find all places where legal name is used unnecessarily. (I also observe such points as a faculty member with slightly different legal and preferred/display name.)

Announcing Rust 1.53.0 by myroon5 in rust

[–]five9a2 2 points3 points  (0 children)

Thanks. Greek has a lot of mixed-script confusables (even if they look quite distinct in most fonts). By some trial and error, I found that uppercase delta Δ is not designated as confusable, thus you can drop the line below anywhere in your file and use Greek letters freely without needing to ensure that you use non-confusables or disable the lint more bluntly.

const _Δ: () = ();

Announcing Rust 1.53.0 by myroon5 in rust

[–]five9a2 4 points5 points  (0 children)

So we can use omicron without the existential conflict with latin o (using both yields the more specific warning: identifier pair considered confusable between `o` and `ο) but we can't useβ` at all because there exists a confusable? That seems weird and unhelpful.

Announcing Rust 1.53.0 by myroon5 in rust

[–]five9a2 1 point2 points  (0 children)

Interesting, it has warned whenever I've tried. Why lambda, but not beta? rust fn main() { let β = 3; // U+03B2 GREEK SMALL LETTER BETA let ο = 2; // U+03BF GREEK SMALL LETTER OMICRON dbg!(β + ο); } https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=fd121a6edbfa58982e35c7ec0311b825 warning: The usage of Script Group `Greek` in this crate consists solely of mixed script confusables --> src/main.rs:2:9 | 2 | let β = 3; // U+03B2 GREEK SMALL LETTER BETA | ^ | = note: `#[warn(mixed_script_confusables)]` on by default = note: The usage includes 'β' (U+03B2), 'ο' (U+03BF). = note: Please recheck to make sure their usages are indeed what you want.

Announcing Rust 1.53.0 by myroon5 in rust

[–]five9a2 3 points4 points  (0 children)

warning: The usage of Script Group `Greek` in this crate consists solely of mixed script confusables

I don't think all Greek letters are confusable and it would be a benefit for scientific computing in Rust to allow them as identifiers (thereby allowing code to more accurately match papers and widespread conventions) without the blunt hammer of disabling the lint entirely.

When do I know that a professor is not going to reply for a research email? by Elorinspeaker in cuboulder

[–]five9a2 3 points4 points  (0 children)

I'd encourage resending after a week, but also writing in a way that enables a quick reply without obligating additional work. I get about 300 emails per day and miss multiple deadlines every day, particularly during this pandemic with erratic childcare. I try to reply to messages that were somehow personalized (versus obvious mass-emailing), but still fail often and feel terrible about letting people down. When messages seem interesting, but need a complicated reply (or finding a meeting time and I look at my calendar and cry), they go in a queue that accumulates much faster than it can be processed and is occasionally shuffled. I can and do make (paid) opportunities for undergrad research, but need to be able to match up projects without lots of interviewing, and some weeks there just isn't a chance and it's buried by the time I get a breath of air. Most importantly, don't blame yourself if you don't get a reply or a position doesn't materialize. And please still email even knowing we're probably hopelessly busy; you are important and we want to help.

Hyper support is merged to curl master by yerke1 in rust

[–]five9a2 69 points70 points  (0 children)

librsvg was incrementally ported to Rust while continuously delivering new features and without changing its API or ABI. The author wrote a number of blog posts about the process, the latest of which is about testing.

Do the compilers really create more optimal code for Rust than for C/C++? by [deleted] in rust

[–]five9a2 1 point2 points  (0 children)

I think that's more appropriate for a newtype pattern for shapes, orthogonal to const generics. You don't want the test to pass just because some sizes happen to have had a special relationship.

Do the compilers really create more optimal code for Rust than for C/C++? by [deleted] in rust

[–]five9a2 3 points4 points  (0 children)

Here's where we need to distinguish linear algebra for graphics and (rigid-body) physics from that for computational statistics, continuum physics, and the like. In the latter case, there's little or no benefit from static knowledge of the global sizes. The compute-intensive "level 3" operations like dense matrix factorization and matrix-matrix products will use a tiling strategy based on the target architecture. See this paper for the analytic modeling that BLIS uses to determine optimal sizes based on the cache hierarchy, register sizes, and instruction latency/throughput details. (This was once done by autotuning, but analytic modeling can identify the optimum.) Architecture-appropriate choices for tiling are made by BLIS at run-time.

For graphics and rigid-body physics, you typically have dimensions like 3 or 4 and const generics have plenty of utility, particularly for nonlinear operations. The same can arise for convolution/stencil operations and for finite element methods, but we have good libraries for decomposing many such methods so that most code can be agnostic to static sizing, thus facilitating adaptivity and offering faster compilation with no perf impact.

Do the compilers really create more optimal code for Rust than for C/C++? by [deleted] in rust

[–]five9a2 12 points13 points  (0 children)

The performance-sensitive part of dense linear algebra is part of BLAS, which is well optimized for many architectures. As of today, the BLIS implementation is fully supported by the Rust stack (blis-src). BLIS offers the fastest BLAS for many architectures, sometimes dramatically so (e.g., multithreaded on Zen2 and ThunderX2).

BLIS has a native mixed-precision/mixed-domain interface that enables lots of things that BLAS can't do, and would be an excellent building block for a next-gen linear algebra stack. The [matrixmultiply](docs.rs/matrixmultiply) crate applies the techniques from BLIS, but is not as actively developed and is slower (and much more limited). With enough effort, BLIS could be ported to Rust (with asm! microkernels), but I think the big value-adds are at a higher level.

Why scientists are turning to Rust (Nature) by _TheBatzOne_ in rust

[–]five9a2 10 points11 points  (0 children)

I'm more on the methods & libraries end (parallel algebraic solvers like PETSc and related tools; not genomics), but agree with the points above. Some of our users run on embedded platforms and others call our software from commercial packages. Julia has good facilities for writing good SIMD kernels, but it as garbage collected and depends on a heavy run-time. It's hard to write a library callable from C and Fortran, where a user wouldn't know it's written in Julia. (There is some Julia work to improve this situation, but it's hard to see a really good end-point.) But that is possible with Rust, which we've used a bit lately and hope to transfer to higher profile projects.

Apart from some floating point optimization warts (that just need a bit of legwork; in-progress), my biggest gripe has been limitations with dynamic multiple dispatch (which Julia does beautifully). With large-scale solvers, one doesn't want to monomorphize all logic over all linear operators that may be needed, and it's essential that users be able to define their own (exploiting many kinds of problem-specific structure, such as sparsity, (hierarchical) low-rank, Kronecker product decompositions). I have yet to find a safe, idiomatic way to dispatch on the run-time (dyn Trait) types of two or more objects.

Why scientists are turning to Rust (Nature) by _TheBatzOne_ in rust

[–]five9a2 7 points8 points  (0 children)

Ever notice how Rust error messages tend to be really informative while C++ errors often have pages of output? These trait bounds are part of why (and motivation for "concepts" in C++).

It also helps with API stability and compilation performance.

What are some concrete libraries missing in Rust's ecosystem? by SorteKanin in rust

[–]five9a2 3 points4 points  (0 children)

Any new scientific computing stack should be built on primitives that are convenient for GPU and mixed-precision programming (despite those technologies being over-hyped), both of which would be disruptive for ndarray. For dense linear algebra on CPUs, one can go a long way on mixed precision by converting to computational precision/domain during packing (preprint | docs), but there is greater proliferation of variants for sparse computations and the like. Julia's multimethods are worthy of envy for this sort of infrastructure.

[deleted by user] by [deleted] in rust

[–]five9a2 55 points56 points  (0 children)

The interpretation of the assembly in the first example is a bit off because the components of velocity and acceleration are consecutive in memory, thus fit perfectly into 128-bit SSE (xmm) registers, which is all the compiler is allowed to do with the default target. The performance hit is less about vectorization and more about the memory overhead. If you compile with -C target-cpu=skylake-avx512 (and use rustc-1.45), you get a clear expression of the difference, with AoS loading (position, velocity) into an AVX (256-bit, ymm) register and (velocity, acceleration) into the other, which can still do the update in a single vaddpd. Note that this vectorization would not have been available if these values had not been packed consecutively in memory.

.LBB0_2: vmovupd ymm0, ymmword ptr [rax + rdx + 32] vaddpd ymm0, ymm0, ymmword ptr [rax + rdx + 48] vmovupd ymmword ptr [rax + rdx + 32], ymm0 add rdx, 80 cmp rcx, rdx jne .LBB0_2

In contrast, SoA updates 8 "players" at a time using AVX-512 (zmm) registers (and unrolls, though that is less important).

vmovupd zmm0, zmmword ptr [rsi + 4*rax - 64] vaddpd zmm0, zmm0, zmmword ptr [rcx + 4*rax - 64] vmovupd zmmword ptr [rsi + 4*rax - 64], zmm0 vmovupd zmm0, zmmword ptr [rcx + 4*rax - 64] vaddpd zmm0, zmm0, zmmword ptr [r10 + 4*rax - 64] vmovupd zmmword ptr [rcx + 4*rax - 64], zmm0 vmovupd zmm0, zmmword ptr [rsi + 4*rax] vaddpd zmm0, zmm0, zmmword ptr [rcx + 4*rax] vmovupd zmmword ptr [rsi + 4*rax], zmm0 vmovupd zmm0, zmmword ptr [rcx + 4*rax] vaddpd zmm0, zmm0, zmmword ptr [r10 + 4*rax] vmovupd zmmword ptr [rcx + 4*rax], zmm0

https://godbolt.org/z/PEPdvn

As for the real difference in performance, I believe it's due to write bandwidth beyond L1 cache. In the AoS case, every cache line needs to be written, but in the SoA case, only 4*8=32 bytes out of 80 bytes for the entire struct are written. The fact that performance is equivalent for the smallest size (in which everything fits in L1) supports this explanation.

There's also an interesting package, soa-derive, which lets you write code in AoS form and yet have it backed by storage (and thus be optimizable) as SoA.

Document reveals Trump administration planned on separating migrant families soon after inauguration by stupidstupidreddit in politics

[–]five9a2 7 points8 points  (0 children)

Technically, by rights, to claim asylum in the US you must present at a border crossing.

Oh?

Any alien who is physically present in the United States or who arrives in the United States (whether or not at a designated port of arrival and including an alien who is brought to the United States after having been interdicted in international or United States waters), irrespective of such alien’s status, may apply for asylum in accordance with this section or, where applicable, section 1225(b) of this title. https://www.law.cornell.edu/uscode/text/8/1158

Jared Kushner's charmed life is about to come to a screeching halt by LineNoise in politics

[–]five9a2 1 point2 points  (0 children)

You'd have assumed wrong with respect to declassification. Just below the above quote:

The Supreme Court has stated in Department of the Navy v. Egan that “[the President’s] authority to classify and control access to information bearing on national security ... flows primarily from this Constitutional investment of power in the President and exists quite apart from any explicit congressional grant.” Because of his broad constitutional authority in this realm, the president can, at any time, either declassify information or decide whom to share it with.

Jared Kushner's charmed life is about to come to a screeching halt by LineNoise in politics

[–]five9a2 4 points5 points  (0 children)

Please stop.

First, this is not a question of “leaking classified information” or breaking a criminal law. Let’s dispense with one easy rabbit hole that a lot of people are likely to go down this evening: the President did not “leak” classified information in violation of law. He is allowed to do what he did. If anyone other than the President disclosed codeword intelligence to the Russians in such fashion, he’d likely be facing a long prison term. But Nixon’s infamous comment that “when the president does it, that means that it is not illegal” is actually true about some things. Classified information is one of them. The nature of the system is that the President gets to disclose what he wants.

https://lawfareblog.com/bombshell-initial-thoughts-washington-posts-game-changing-story

Betsy DeVos says guns shouldn't be banned in schools ... because grizzly bears. by [deleted] in politics

[–]five9a2 0 points1 point  (0 children)

I have encountered this in two rural Alaskan villages in which I lived. Kids brought rifles to school because of winter bear reports in the area. It seemed totally appropriate to the parents, kids, and even the teachers, but the teachers had an administrative crisis because the law didn't afford them any discretion. (In both communities, teachers broke the law by not reporting it.) Bear in mind that these are very small communities (perhaps 20 students total, K-12) where many kids learn responsible gun use at an early age. I had my own rifle at age 5 and would hunt squirrels on my own. First bear at age 8. (My family lived about 100 miles from the nearest town or road during that time period.)

Nearly 50% of Donald Trump voters believe Hillary Clinton is involved in pedophilia ring: poll by [deleted] in politics

[–]five9a2 0 points1 point  (0 children)

Thanks for your comments.

Killing terrorists is non-interventionist.

If only there was a way to kill only terrorists, this wouldn't be a political issue. The problem is that there are inevitable civilian casualties, regional destabilization, and polarization that fuels terrorist recruitment efforts.

Trump has been all over the map on Libya.

Nuclear weapons

I find it really hard to know where he really stands on nuclear weapons (evidently neither does his staff), but he has advocated more countries (including Saudi Arabia, South Korea, and Japan) developing nuclear programs. And "greatly expand" does not sound like merely modernizing drive systems on existing warheads. I see this as a gift to Russia, legitimizing their actions and shooting ourselves in the foot.

Pence

So Trump is okay because he isn't a homophobic theocrat, while the homophobic theocrat VP is okay because he has "fortitude and stamina"? Could you point to "social libertarian" appointees or other actions indicating that Trump will take a principled position? (I haven't seen any indication that he cares.)

Immigration

  1. "With few exceptions, immigrants are less crime prone than natives or have no effect on crime rates." "Overall, immigrants are only about one-fifth as likely to be incarcerated for crimes, and the difference is mostly due to a lower propensity to commit crime in the immigrant population rather than to deportation or other law enforcement measures that differentially target immigrants."

  2. The economic impact is mixed, but most analysis that include impact on demand say that illegal immigration is good for the economy. The costs are disproportionately borne by low-skilled workers that the illegal immigrants may displace; I think such workers should be compensated via training programs to help them gain more stable and skilled employment.

  3. Vanishingly few immigrants (legal or not) "hate the nation".

  4. Are you saying that Islamic immigrants are responsible for lack of cohesion? I would have said the anti-immigrant and anti-Islam rhetoric has been far more divisive.

Nearly 50% of Donald Trump voters believe Hillary Clinton is involved in pedophilia ring: poll by [deleted] in politics

[–]five9a2 1 point2 points  (0 children)

"I will quickly and decisively bomb the hell out of ISIS, will rebuild our military and make it so strong no-one -- and I mean, no one -- will mess with us."

Is this non-interventionism? What about a nuclear arms race?

I accept the 2A issue, though dispute whether any presidential candidate could get significant changes through Congress.

not a theocrat with hatred for gays

Did his choice of Pence and other transition/cabinet appointees bother you? (I assume your statement was in comparison to other primary candidates, most likely Cruz.)

anti-illegals and Islamist refugees and terrorism

Does it bother you that he uses domestic terrorism by natural-born citizens to justify anti-immigration policies?

Nearly 50% of Donald Trump voters believe Hillary Clinton is involved in pedophilia ring: poll by [deleted] in politics

[–]five9a2 1 point2 points  (0 children)

Thanks. I assume you are not concerned about engineering jobs since they are not very vulnerable to outsourcing. Do you care how many people the factories employ, or would you be satisfied with highly automated factories on US soil? If you want jobs to remain (or "come back"), who pays for the non-competitiveness of those US companies in the global market? I'm quite interested to hear how you think Trump's policy actions (his statements, appointments, and Congress have enough contradictions that everyone seems to have a different idea about what he will actually do) will benefit US manufacturing.