3 pointsby smoothdeveloper3 hours ago1 comment
  • smoothdeveloper3 hours ago
    Clef is a new backend for F# language aiming the language at concurrent systems use cases on native targets.
    • PaulHoule2 hours ago
      How do you really target FPGA and GPU when these are so different?

      e.g. what I find appealing about FPGA is (1) very low latency and (2) arbitrary precision data paths, like if I want 6-bit data paths I can have them. The GPU on the other hand is throughput oriented and you get the data types that were baked in.

      I remember looking at

      https://www.intel.com/content/www/us/en/developer/tools/onea...

      and thinking "how could that possibly work?" and the fact that it's had basically zero uptake suggests to me that my hot take was the right take.

      • smoothdeveloper2 hours ago
        For GPU, F# has prior art in targeting it, a notable one is https://developer.nvidia.com/blog/jet-gpu-powered-fulfillmen...

        I believe it is mostly about intrinsic libraries and developing the code to stick to the idioms of using such libraries; in the context of Clef, maybe the author of this infrastructure is aiming at close interaction between the compiler frontend, a standard GPU programming library and the Clef backend, but I can't really comment on this.

        What Clef seems to be doing is: * bringing semantics that are needed for native platform targeting, expressed with idioms familiar to F# developers (through the type system and the lowering during compilation stages, retaining target specific semantics) * making the broad F# programming idioms applicable to such targets (when applicable obviously)

        The website contains a lots of detailed articles about aspects of translating F# constructs to the type of environment this compiler targets, but AFAIR, nothing specific to GPU programming.