Skip to content
PodSubs
ShowsPeopleGuestsJobsNewsEvents
More
BlogPodCred
Menu
ShowsPeopleGuestsJobsNewsEventsBlogPodCredNetworksSign in
Join nowSign in
  • Shows
  • People
  • Jobs
  • News
  • More
    • Guests
    • Events
    • Blog
    • PodCred
    • Networks
    Join nowSign in

ADSP: Algorithms + Data Structures = Programs

ADSP: Algorithms + Data Structures = Programs artwork

Episode 170: VIN & HPX

Feb 23, 202427 minAudio

In this episode, Conor and Bryce chat about VIN numbers and the HPX parallel execution model. Link to Episode 170 on Website Discuss this episode, leave a comment, or ask a question (on GitHub) Twitter ADSP: The Podcast Conor Hoekstra Bryce Adelstein Lelbach Show Notes Date Recorded: 2024-02-22 Date Released: 2024-02-23 Top Market Cap Companies Top 10 Market Cap Companies as of Feb 22, 2024 VIN (Vehicle identification number) Numbers ISO 3779 ISO 4030 HPX Adaptive Global Address Space Intro Song Info Miss You by Sarah Jansen https://soundcloud.com/sarahjansenmusic Creative Commons - Attribution 3.0 Unported - CC BY 3.0 Free Download / Stream: http://bit.ly/l-miss-you Music promoted by Audio Library https://youtu.be/iYYxnasvfx8

Audio and video play straight from the show's own hosting. PodSubs stores and serves no media.

Transcript

From the show. Tap a time to play from there.

ConorNo, for the for those of you that have listened either from the beginning or you tuned in part way and you went back to the backlog and you've listened to every episode, you are our most important listeners. Not not your mom who tunes in every once in a while. Absolutely not, Bryce. She is our legal counsel, don't get me wrong. But uh our most important listeners are the ones that listen to all our episodes.

BryceA lot of problems this morning.

ConorYou know what problem we don't have? What problem don't we have? Oh come on. Come on, man. What problem don't we have? Uh I don't know. What problem don't we have? Oh, should I share my screen briefly? Yeah. Should I share my screen briefly? You should. Let's go!

BryceOh yes. We certainly do not have a problem with how our company is doing.

ConorLargest market cap.

BryceUm I think we're number four.

ConorWe're number four, baby, but at this point we're approaching two trillion. We are less than two hundred billion away from taking over Saudi Aramco. Can you believe it, folks? We're more valuable than Amazon in fifth, Alphabet in sixth, Meta in seventh, good old good old Warren Buffett. Berkshire Hathaway at number eight. We're even more valuable than him, folks.

BryceYeah. Woo!

ConorMicrosoft and Apple number one and two, just to fill out the top eight. And I guess we'll do top ten. Oh, I didn't know that. TSMC is number 10? Yeah. And Eli Lilly. Eli Lilly, here's a quiz, Bryce. What drug is Eli Lilly famous for?

BryceI don't know, insulin, I want to say.

ConorYeah, that's correct.

BryceYeah. Wow, I'm really na I'm really nailing nailing the quizzes. Yeah. Yeah, I'm, you know, it's I I remember I remember when I enjoyed NVIDIA in um uh like six years ago, and it was sort of before the the big it was right after Volta was released, and it was before the big AI wave. And some people told me at the time, like, oh, you don't want to go work for one of the hardware companies because like NVIDIA and Intel, they don't pay as well. You know, you should go work for like a Google or uh you know a Microsoft or an Apple.

BryceUm, but you know, I just thought I I came to work here because like I was so impressed with the people from NVIDIA that I interacted with on the C committee, um, Olivia Garot, Jared Hobrick, and Michael Garland. I was just so impressed by them um that I just knew that this is the place I wanted to go work. And my background was in parallel programming, and it seemed to me like they were really the parallel chip company. And I was like, this is the place for me.

BryceAnd uh boy, boy, has it worked out. That's up to you. But you know, you know, here's something you can leave in. So so in 2011, when I was just a wee little kid, uh my parents encouraged me to um uh like start saving. And like as part of that, they were like, you should take like a couple hundred dollars of your your money and um just play around with some some stocks, just to you know, not don't don't put all your savings in your own investments of your own choice, but just so that you like learn a little bit about the market and just as a um I don't know, learning experience.

BryceAnd uh I don't remember all the stocks that I bought. I bought some that were like some solar cell companies and one like EV company, um uh uh all of which were like like one of which was like a Chinese startup that like I'm sure is no longer around. But uh then I also bought uh AMD and NVIDIA um because I was at LSU at the time working on HPX and I thought that they would be big winners in the future. And that was in 2011, and I couldn't have bought more than uh $100 or $200 of each. But uh like a year or two later, I just sold all that and just moved everything into index funds with my financial advisor um uh advisor.

BryceAnd for a few years after that, I would look back at how had my portfolio done if I had not sold it. And I haven't done that in a number of years, and I don't even want to know how much if I had held that $200 of NVIDIA and uh in the $200 of AMD stock from 2011, I don't even want to know how much it would be now.

ConorYeah, it's always hard looking back at that stuff. Uh yeah. And just for just for context, because I guess this is I mean, it's pretty relevant for those that are listening on Friday when this gets released. But we are recording this the day prior to Friday, February 23rd.

BryceI'm actually I'm going I'm going to my first uh like in-person company all hands meeting today because I'm at I'm in Hillsboro, Oregon, uh, because my girlfriend's here for work, and so I figured I'd tag along and go visit my colleagues who are here who work on the NVIDIA HPC compiler. And they happen to have uh like a you know, the CEO's not doing the all hands here in Oregon, which is one of our satellite offices, but uh they have like a viewing party to for everybody in the local office to tune in to the all hands.

BryceAnd uh so I'm going to my my first in-person all hands. I've been here six years, I've never been to an all hands in person. I remember when I was in headquarters like a few times walking past the ongoing all hands, but being like, I can't, I I don't have time for this. Like I got I got I got too much stuff to do right now. I've I've I think I've like maybe called in to one or two, but I haven't really ever like attended like an all hands meeting. Um so now I'm gonna attend an all hands meeting. And I'm bringing bringing I got my dog here with me who's traveling with us, and so she's gonna come to her first NVIDIA all hands meeting or her first NVIDIA all pause meeting.

ConorAlright, so I got one comment to finish, and then I've got a question. My first comment to finish was I was I was given some context uh the r by the day that we were recording this because we were talking about market cap. Nvidia, at least at this point in time, it is 12.15 p.m. EST. So we're mid-market, market's been open for three hours and fifteen minutes. We're up 15% right now. So uh our market cap, we were ranked fourth at the beginning of the day, we'll probably be ranked fourth at the end of the day, but uh it's been a good day.

ConorBut you know, it's all ephemeral, it'll go down, it'll go up, whoops. My my question now is uh you realize that the all hands is at 1 p.m. Eastern time and therefore 10 a.m. uh your local time, which means you have 45 minutes to get there, right?

BryceWell, yeah, I mean I I imagine I'll probably miss a little bit of it. And I do I do I do I do have to you know make slides during it because I'm giving a talk uh later in the day.

ConorYeah, I mean that's this is the beautiful thing about attending these things remotely, which is what I have I've never been to a an all hands in person. An all hands doesn't need doesn't require a hundred percent of the attention. Yeah, you know, if we're if we're being honest. You can especially if you're doing things that require compiling or running tests that you know have a little five-minute or ten minute uh loop. Perfect. Perfect time to do that kind of stuff because you can pay attention, hit the button, and uh boof.

BryceYeah. And I mean I have I have uh all the content for my slides. I just need to take the code and put it into slide form and add a few notes. Yeah, so I actually I have two topics for us today.

ConorAll right, shoot.

BryceThe first topic is I got uh I got uh a question from our most important listener, my mother, who apparently has told some of her friends about uh about uh the podcast and they have listened. She's listened to a couple episodes, I think, too.

ConorUh well she's clearly not our most important listener. She doesn't listen to every episode. Listen to this.

BryceMy mother, she's the most important line listener. She's the most important listener.

ConorFor those of you that have listened either from the beginning or you you tuned in part way and you went back to the backlog and you've listened to every episode, you are our most important listeners. Not your mom who tunes in every once in a while. Absolutely not, Bryce. She is our legal counsel, don't get me wrong. But uh our most important listeners are the ones that listen to all our episodes.

BryceSo she she she sent me a text and she said, Dear ADSP, how are VIN numbers assigned to cars? Um and this is, I presume, a follow-up to she must have seen our episode about uh how credit card numbers are issued, and I also mentioned it to her. Um so so for those who don't know, every car has a uh a VIN number, which is uh an identifying number that gets issued to it. So I did a little bit of research on this, and it's not, I think, as interesting an algorithmic question as uh the credit card numbers.

BryceBecause one of the key things with the credit card numbers is that with the credit card numbers, you don't want them to be issued sequentially because you don't want them to be guessable, because if they're guessable, then uh they're attackable, right? Then you can find out somebody's credit card number and maybe, you know, and if you can find out their credit card number, and if maybe you have some some way of telling from this if they were issued sequentially, then maybe you could figure out roughly when the card was issued, and then if you knew what the typical expiration date uh length is for uh for that card uh issuer, then you could figure out you know the credit card's expiration date, yada yada.

BryceMaybe you could figure out the billing zip code and then you're able to, you know, to use that card number. So obviously with credit cards, you need to make sure that they're not issued in in a predictable way. But not so much a problem with uh vehicle identifier numbers. Um now VIN numbers that tend to differ from country to country, uh how they're issued. There are some some unsurprisingly ISO standards for VIN numbers. Uh I don't think we're gonna purchase and look at those today. Um there's uh ISO the listeners want another PDF purchase for an obscene amount of money for 12 pages.

BryceSo there's uh two standards. Uh there's ISO 3779, which uh uh defines the like structure in the content in a VIN number, and then ISO 4030, which uh it says is about location and attachment, um which I think is uh like the like where it should go on the car. Um and uh they are uh not just for for cars, but also for um uh uh towed vehicles, motorcycles, uh, and things like scooters and mopeds, etc.

BryceUm and uh uh the the there's a couple interesting things about about VIN numbers that I think uh lead to some lessons about uh programming in general and in particular designing address systems. Um so a VIN number isn't just solely a uh unique identifying number, um, just as a credit card number actually isn't solely a uniquely identifying number. Um you know, the credit card number has some information embedded in it, like you know, who the credit card issuer is.

BryceUh, in the case of a VIN number, you have the um the manufacturer identifier as part of it, and then there's um a vehicle descriptor section um which tells you like the general characteristics of the vehicle. Um, and then there's a vehicle identifier section, and that can be the uh just solely like a unique serial number. Um, but um a lot of manufacturers will uh uh include you know some things like the make model, you know, what what engines in the car, um, some some other details that are maybe specific to them will be embedded in that vehicle identifier section.

BryceThe stated purpose of the vehicle identifier section is that it's um supposed to be an indication that provides clear identification of a particular vehicle, whereas the vehicle descriptor section is supposed to be provide an indication of the general characteristics of the vehicle. And so the thing that I think is interesting um uh for us to talk about in the context of programming is this notion of um information embedded in address spaces. Um this is actually uh something that I'm quite familiar with because back in the day I worked on HPX, this parallel runtime system at LSU.

BryceAnd the thing that I like my primary contribution there was redesigning a system that we called the adaptive global address space, which was HPX's addressing space. And at the time it was a 128-bit address space. Um and if you think about your like local memory address space on most systems, um, you typically think about that as like, oh, well, that's you know, it's just some some arbitrary, you know, uh 64-bit number that points to some memory location that the um operating system issues.

BryceBut but actually, depending on the operating system, some operating systems don't just it's not just like solely an identifier. There's usually some prefix um there that's maybe associated with your particular process. Um, although these days, um uh with address space randomization, it tends to be less predictable what the actual structure of a local memory address is. But in HPX, we um we did sort of the same sort of thing that the credit card system does and that the um uh the VIN system does, which is that we embedded useful information into the address itself.

BryceAnd in particular in HPX, we had this 128-bit address, and the lower 64 bits we would use to embed uh a local memory address. So in HPX's model, HPX was a distributed model. And so these 128-bit bit addresses were global addresses to objects that lit that would be somewhere in the system. And what we did with those lower 64 bits is we would embed the local um address of, hey, on this, you know, this is the memory address on whatever particular system this um thing lives on.

BryceAnd this was quite useful because this meant that uh when you were routing a request to a particular distributed object, you didn't have to do a local lookup of what's the address of this object in local memory. So you could you could take this 128-bit address, you could look at the top 64 bits, which in which had the information about like what node is this thing on, and then you could dispatch a dispatch a message to that node. And that message could could use the local pointer to that object.

BryceYou didn't have to go to that node and then say, hey, I'm on this node. Um let me you know let me go and access this object. And we actually embedded some other information in this address too. Uh one of the most uh interesting things, I think, from a programming language perspective is we embedded um uh typing information into the address. Uh so in HPX's model, um the uh all of the objects in this global address space were objects. They were they were classes, they weren't, it wasn't just like raw memory, but everything was an object.

BryceUm and so every object would have a particular type. Um, and those types would be registered globally. And so every every one of these global addresses would have the type embedded in there, which was useful because if you wanted to do like a remote procedure call, um you could do some type checking to make sure that that you're you've got an object of the correct address of the correct type before you even um uh uh dispatch the message. So it was like this like fat pointer that embedded the type in it.

BryceUm now there was uh one challenge uh with um uh HPX, which is that it was an active global address space. And the active part was that objects could move from uh one node to another node for load balancing purposes. Um and so the way that we handled that is um that essentially we would uh if if an object moved from one node to another node, we couldn't change the address because the the address itself has embedded in it information about what node it lives on and the address of the object on that node.

BryceAnd we wanted our system to have a property that we call referential integrity, which means that uh if you have a reference, a pointer to an object, that's always good. Even if the thing moves from one place to another place in this distributed address space, the original address remains good. And so what we did was we simply, if if an if a node received a message to a particular address and that address had moved, the node would just redirect to wherever the new place is.

BryceUm and uh uh and then eventually through caching, um, everybody would hopefully get the update. And when it does the redirection, it would also send a message back to whoever communicated with it saying, hey, this thing's moved, put this into your address cache. Um, so that you stop calling me and asking me like to redirect this thing to somewhere else, because otherwise, you know, I could end up with this node, which was probably already experiencing high load balance, which is why stuff was moved away from it.

BryceAnd then if it has to be spending all this time redirecting things to other nodes, well, that's just gonna make the load balance issue worse. So, so and one of the other useful things about having the uh the local address uh embedded in the global address was that it it optimized one of the um the fast cases, which is if I'm accessing an object using its global address, and the object lives on the node that I'm on, which is the common case, um, that I'm doing work on a local object, I can completely avoid any communication with the addressing server because I can see, hey, um uh I'm I've got this address, I can see that this address, the node that this object is lives on, is my current node, and there's a fast way that we can check that in our system.

BryceWe don't have to go round trip to the global addressing server. So I know that this object is local, and I know that it hasn't moved. Um uh and I can check that quickly, and then hey, because I have the local address here, I don't have to go look up where this object is, I can just take the local address out of this global address and dereference it, and boom, I'll have an actual object in memory. And I I think a lot of uh uh uh address spaces these days tend to have this sort of uh uh embedded useful information uh in some way, shape, or form.

BryceUm you know, a lot of people uh maybe think like, oh, we'll never need more than 64-bit addresses um uh for memory. Um but it actually we almost certainly will in the future move to uh um uh wider addresses uh because as uh uh uh as processors become more complex and we see more specialized uh hardware and and uh specialized memory and types of memories, I think that we'll start to see more and more of a uh uh a need for clever addressing systems where we have all sorts of embedded information in the addressing systems, and that will require more bits than we currently have.

BryceOh, another another interesting thing that we would embed in the uh uh HPX addresses is that in HPX, all of the objects were um had their lifetimes managed by reference counting. And um the addresses themselves would have a uh a number of reference counts in it. Um and what you would do is every time you send the address to another node, so every time you serialize the address and it gets sent over the wire to somewhere else, you split the reference count.

BryceSo the sender keeps half of the reference count and the uh receiver gets half of the reference count. Um this way, when you send a message to another node, you don't have to go and call the global addressing system and say, hey, give me an like increment the reference count. You avoid having additional reference counting traffic back to the original owner of the object when you're communicating. And uh so that was a pretty clever little trick. And essentially that meant that these addresses, while they had this property of referential integrity, um when you were comparing these addresses, you had to mask away the uh uh the reference counting bits because those would those would always change.

BryceBecause I I could have the address on my uh you know, in one place uh where it has you know 128 uh uh reference counts left, and then on uh some other place, maybe I have an address where the same address, but where I only have 32 reference counts left on it. And those two should compare equal because they're the same address. I've just got this coupled. Bits in the address where I'm storing this reference counting information. So it was a pretty cool system. I was pretty uh I was pretty that was some of the best code I wrote, I would say.

ConorSo this all started with and comparison to VIN numbers? Yeah, to VIN numbers. How much of this complicated HPX uh fanciness ties back to the VIN number?

BryceWell well, all of the fanciness in the HPX address system was all about this idea of we're going to embed useful information into an address. Um so the address is yes, it's a unique identifier, but it also has useful information. And that's applicable to credit cards and VIN numbers too. Both credit card and VIN numbers have this check digit thing where given a VI number, you can some of the some of the digits in the VI number and some of the digits in a credit card number are check digits that are computed from the other digits.

BryceSo you can do this quick check to immediately determine whether or not the address that you have is um uh complete garbage or not. Um like that's in that's a clever use of embedded information. Um and also given a credit card number, you can uh you can tell who the card issuer is. You know, like you see some websites out there where they they ask you to select like Visa, MasterCard, or Amix. Well, they don't have to do that. They can actually infer that, the type of the entity from the number, just in the same way that in HPX, given an address, you can you can determine what the type of the object that it points to is.

ConorSo what and what is it about VIN numbers? They're just storing certain pieces of information about the vehicle or the seller or something like that.

BryceYeah, yeah. Certain information about like the make and model of the vehicle, um uh and uh the manufacturer. Um uh there's a few other things that can be in there. Like you can tell like what the model year of the car, you could tell um uh the you know what type of engine, like what are some of the features of the car, like is it um, you know, is it a a Mazda 3 with uh you know this engine or that engine, like which trim is it?

BryceUm sometimes even things like the color, etc., which is like like useful and important if you, for example, for for law enforcement to be able to, oh, you're just sending around the VIN number and I can tell, oh, I'm looking for a, you know, this VIN number is a white Toyota Corolla. Um, and that can just be inferred immediately from the VIN number without having to go and query some database. Or rather, I should say, like, like one of the key properties of HPX, one of the reasons why we embedded all this information, was to avoid having to send queries to a global server or to a server that lived somewhere else.

BryceThat we wanted to localize the lookup of information. And VIN numbers let you do that too. You know, every every police car can have a computer in it that has a little database of all of the um decodings of VIN numbers, and then you know, you can just type the VIN number in there. You don't have to go and call some server and look up, you know, which like what's the make and model of this car. You can just that information can all be in a little local store and uh of decoding info.

ConorYeah, that is useful. I've never, for the record, never owned a vehicle, which is why I know so little about uh all this stuff.

BryceBut to answer the qu the the original question of my mother, which is uh uh how are they issued? Um so one, they are assigned when the car is is actually manufactured, and um most manufacturers just issue them sequentially. Uh and so the number typically you know would indicate like what not like the actual part of it that's solely a number indicates in what number of this car rolled off the factory line. Um because again, there's no there's no security need to randomize that part of it there.

BryceAnd there is some, you know, uh in certain uh countries and places uh the VIN number you when you have to like register it with um uh some government agency um when the car gets created and the manufacturers all take care of that. And there there was there was a uh there has been some effort in recent years to uh update and modernize the VIN systems, at least in the US, to accommodate uh uh sort of future growth.

ConorInteresting. Yeah. Be sure to check these show notes either in your podcast app or at adspthepodcast.com for links to anything we mentioned in today's episode, as well as a link to a GitHub discussion where you can leave thoughts, comments, and questions. Thanks for listening. We hope you enjoyed and have a great day.

BryceLow quality, high quality, that is the tagline of our podcast.

ConorThat's not the tagline. Our tagline is chaos with sprinkles of information.

Open the transcript file

Hosts and Guests

Nobody is credited on this episode yet.

Credit the people on this episode

Be the first to rate this episode

More episodes

All episodes
  1. Episode 313: C++26 Reflection vs CRTP, AI, Kids & More with Zach Laine

    Nov 20, 202647 minAudio

    In this episode, Conor and Bryce chat with Zach Laine about C++26 Reflection vs CRTP, AI, kids & more. Link to Episode 313 on Website Discuss this episode, leave a comment, or ask a question (on GitHub) Socials ADSP:...

    • Apple Podcasts

    Credit the people on this episode

  2. Episode 312: The C++26 Contracts Fiasco

    Nov 13, 202652 minAudio

    In this episode, Conor and Bryce chat with Zach Laine about the C++26 contracts fiasco. Link to Episode 312 on Website Discuss this episode, leave a comment, or ask a question (on GitHub) Socials ADSP: The Podcast:...

    • Apple Podcasts

    Credit the people on this episode

  3. Episode 311: Career Changes, GPUs & More with Zach Laine

    Nov 6, 202628 minAudio

    In this episode, Conor and Bryce talk with Zach Laine about his career and the career changes he has made. Link to Episode 311 on Website Discuss this episode, leave a comment, or ask a question (on GitHub) Socials...

    • Apple Podcasts

    Credit the people on this episode

  4. Episode 310: Leaving NVIDIA for... ?

    Oct 30, 202624 minAudio

    In this episode, Conor and Bryce talk about Bryce's next chapter and where he is leaving NVIDIA for. Link to Episode 310 on Website Discuss this episode, leave a comment, or ask a question (on GitHub) Socials ADSP: The...

    • Apple Podcasts

    Credit the people on this episode

  5. Episode 309: Default Construction & CppCon 2026 with Jason Turner

    Oct 23, 202629 minAudio

    In this episode, Conor and Ben chat with Jason Turner about default construction in C++. Link to Episode 309 on Website Discuss this episode, leave a comment, or ask a question (on GitHub) Socials ADSP: The Podcast:...

    • Apple Podcasts

    Credit the people on this episode