• 24 Posts
  • 78 Comments
Joined 5 years ago
cake
Cake day: October 18th, 2019

help-circle













  • wazowski@lemmy.mltoLinux@lemmy.mlTorch package
    link
    fedilink
    arrow-up
    6
    ·
    3 years ago

    it’s really a miracle how all of this is held together tbh while being so cross-platform

    the core engine of torch, which contains things like vector calculus (automatic differentiation), some tensor operations, data preprocessing, data de/serialisation, et cetera, is written in regular C++, so it basically runs on anything that a C++ compiler could target, which is basically everything

    the problem starts when you want to add gpu acceleration in order to speed up things like matrix multiplication (which is typically the most computationally expensive part of the machine learning pipeline)

    when torch (and other ml libs) started out, cuda was basically the most advanced, easiest to use lib for gpu compute (probably still is), and nvidia gpus were far superior to anything the competition could offer, and ml on mobile devices wasn’t a thing, so everyone went for it and for a long time ml existed almost solely on devices with nvidia graphics cards that could support cuda

    then amd and arm started to catch up, and things like amd rocm was added to support amd gpus, vulkan was added to support both gpus on mobile devices and also nvidia and amd gpus, and at the moment all of this exists in this kind of mess, where practically all functionality is supported if you use cuda, but for rocm and vulkan a lot of things don’t work, and you often have to compile everything from scratch for things to be supported

    and now all of this mess is wrapped in python to simplify the api, which was a big mistake in my opinion, bc not only is the api simplification unnecessary, but now if you want to target any specific architecture, it must be supported by the core torch engine, some version of a gpu compute lib (unless you want to do inference on the cpu, which you prolly don’t), and the python wrapper

    so now, bc you want everything to work out of the box, all of these things are put into a binary, which results in this huge file size, and i imagine the maintenance of torch is pretty hard at least partially as a result of this

    if you were building something like torch today, things are a lot more simple, bc you could just write the core engine in smth like C++, and then use smth like vulkan kompute, which is the name of a wrapper api around regular vulkan, but massively simpler and more user-friendly, and supports every gpu under the sun, and boom, you have an much more concise and easily maintainable library


  • wazowski@lemmy.mltoLinux@lemmy.mlTorch package
    link
    fedilink
    arrow-up
    3
    ·
    3 years ago

    basically torch is an huge lib in itself, and it targets not only virtually all cpu architectures, but also multiple gpu frameworks (cuda, roc, vulkan), all off which support thousands of gpus together, both desktop and mobile

    and all of this is packaged into a single binary so that it works for everyone, regardless of hardware

    if you want a smaller size, you can compile it from source for your specific architecture, or download minimised precompiled versions for your target architecture






  • Every problem I have seen distributed consensus blockchains have been so far used for seems to have a solution that does not require such blockchains, which doesn’t have drawbacks associated with such blockchains.

    a solution which doesn’t have some problems associated with blockchains, but introduce their own problems, which do not exist with blockchain space

    for example, you mentioned federated code hosting or social media platforms (like lemme), in this case, you eliminate certain problems exclusive to blockchains, but simultaneously introduce other problems, like more centralisation and potential for censorship (instances in the fediverse are controller by individual ppl, who have virtually complete control over that instance, and these instances are accessed using http and dns, the former of which having little resistance to censorship and the latter being mostly very centralised), which are problems already solved by blockchains

    so once again, it’s a question of what you value more and what’s you’re ready to sacrifice


  • my main point was partially lost in the increasingly lengthy quotation trees caused by the git tangent, which in turn resulted from my improper definition of the word blockchain, causing it to include technically correct variants of blockchain (like git), but ultimately not related to my point

    by using the term blockchain i refer to copies of series of cryptographically linked pieces of data, continually (with exceptions of contingencies, but still near 100%) and publicly hosted by multiple peers, containing a (deliberately designed and publicly known) mechanism by which entity A would be able to append a piece of data to existing series of pieces of data (following the rules of said mechanism), given that A has made an investment of some sort (money, time, computing power, space or similar, but necessarily fungible resource), and have this change propagated to all nodes, who host said copies of series of pieces of data of their own volition

    this list of parameters constituting the definition of blockchain is something no other technology i’m aware of can provide

    in my opinion, any other combination of technologies emulates this set of parameters imperfectly and with compromises which i wouldn’t want to accept, even despite all of the legitimate drawbacks you mentioned

    edit: at this point i can only propose to agree to disagree, because after spending like an hour trying to write up a meticulously crafted comment to leave no room for interpretation i did not intend for (and erasing that comment afterward), i think that there’s no objective way to quantify the overall benefits/drawbacks of any set of technologies in order to definitely prove that one set of said technologies is better/worse than another


  • Yes. Git repositories are, effectively, blockchains. Blockchains (understood as in the link: as data organized in linked blocks, roughly) can be useful in anti data-tampering applications. Or in auditing applications.

    well, yes, except in the ways that actually matter, for example, you can hard reset a git branch and erase all the data after that, a git repository is usually centrally controlled by the few ppl who own it or are contributors to it, git repositories don’t have any inherent hosting in and of themselves (your git repo can be created offline and never be reachable by anyone, in fact, most git repos are like this)

    so, unlike a git repository, a blockchain could allow you store data that is

    • immutable (undeletable data)

    • publicly available for anyone to read

    • publicly available for anyone to write (in a way so that it can’t be spammed to infinity and rendered useless)

    • always online

    which enables you to do things like authentication 🤷‍♀️, which you can’t do with git

    See, this is where you lose me. Adding this whole “financial” part to this is what gets us into problems. You can reward for things without using blockchains with distributed consensus mechanisms (a very special types of blockchains, that because of cryptocurrencies et al became somehow synonymous with “blockchain” in general).

    could you elaborate here? for example, how would you replace something like filecoin, which helps track where/how much/how long etc a particular piece of data is, and rewards ppl storing it with tokens?

    The problem with DAOs is that they are effectively bug bounty programs with the rewards for finding bugs up to the whole value of the DAO. Smart contracts are, effectively, immutable (one of the points made by cryptocurrency proponents over and over again and billed as a good thing, ironically). Humans make mistakes. Coding is difficult. So DAOs will contain bugs, and it happens over and over and over again, just look at Web3 Is Going Just Great.

    Not to mention the first and famous DAO exploit that led to Ethereum literally hard-forking to roll it back. The reason I keep mentioning this DAO Eth hard-fork is because it shows very clearly that all the hand-waving about cryptocurrencies, blockchains, decentralization, independence, “personal responsibility”, and all the other taking points is just that: hand waving. Where the rubber hits the road and with enough financial stake on the line, it’s all negotiable. Blacklisted wallets are another great example of this.

    it’s true for any piece of software, and there have always been dangerous exploits, this doesn’t mean we shouldn’t use software

    you’re right about the distinction that with DAOs and blockchains, bc everything exists within the digital realm and most actions are completely irreversible (unlike, say, a server, which can be hacked, but you will still always have the physical machine with you), but this is the price you pay for decentralization, and in my opinion, it’s worth it in certain scenarios

    one such scenario is a decentralised git hosting platform, where the data on which a DAO can act (the git repository) has no inherent value, that is, if you steal it, you can’t sell it, bc owners will just copy it and create another project, nothing of value is lost, except the fact that you now have to re-erect the governing structure from the ground up

    it’s a subjective point whether such risks are worth the benefits, and i think it’s fine to disagree about this one

    I’ve been looking at this scene since the BTC genesis block. I have yet to find legitimate applications of “these technologies” (blockchains with distributed consensus, roughly) that are not incidental compared to the amount of scams etc happening based on a given cryptocurrency/token/whatever. If you know any, I’m all ears.

    right of my mind would be radicle, which is a decentralized code hosting platform, or 3box, which provides authentication services, i’m a blockchain developer, so you prolly shouldn’t ask me

    to conclude my comment, i would like to reiterate that decentralized technologies like blockchain certainly have a cost to them: the fact that everything exists digitally, is therefore often irreversible and unforgiving, and you have to have some sort of investment (time, money, compute) in order to have controlled write access, and it’s up to you to decide whether these sacrifices are worth it compared to traditional technologies


  • sure, i agree, but these are virtually impossible to verify in some kind of consistent/independently executed manner

    by the way, if any of y’all have a crypto friend who mines some currency, just show them the prices for rending their gpu for things like ml compute or some other type of compute, it pays literally several times better, idk why ppl with gpus still bother with cryptocurrencies 🤷‍♀️



  • i agree that there’s an immense amount of overhype and dubious applications of these technologies, and the important point in this video that i really like is that blockchain technology can only fix problems that exist entirely in the digital space, that is, you can’t fix societal or tangential problems with it

    but, are you really unable to imagine even a single application of blockchain could be actually useful? for example, purchasing distributed compute, or rewarding users for renting their storage space, or a git hosting service where repositories/organizations are managed via DAOs? or any number of combinations of these?

    the technology is useful, it’s just been extremely overhyped and overinflated by capitalists trying to extract as much profit as possible, which distracts ppl from legitimate applications of these technologies 🤷‍♀️