From London, England, it's theCUBE. Covering Discover 2016 London. Brought to you by Hewlett Packard Enterprise. Now, here's your host, Dave Vellante and Paul Gillis. Welcome back to London on the chilly banks of the River Thames here at Excel London. This is HP Discover 2016. This is theCUBE, the worldwide leader in live tech coverage. We've been here, Paul Gillin and I for three days extracting the signal from the noise. Vish Malshand is here. He runs product marketing and management at HPE. And Inga Erling is here from Werner, retail company. Really exciting company with numerous sites, websites and presence across Europe. Gentlemen, welcome to theCUBE. Thank you. We're talking storage, we're talking flash, all flash, acceleration, wheelhouse, we love it. What's the vibe, Vish, on the floor?  So all flash, Dave, we've been talking about this now for several CUBE sessions, right? And I think my view of the all flash and where it's heading, if that was your question here, was I think we've seen these waves of flash. Wave one back in 2012 was that performance wave, right? The likes of violin memory comes to mind at that time where there was a small number of applications that required that critical performance and then justify the cost of the flash at that time. That was wave one. Wave two is the wave we're in right now and I call it the affordability wave. In addition to the performance, we saw data reduction technologies, we saw larger capacity SSD drives, we saw improvements in power cooling density, customers reported administrative savings. So there was this economic wave that we're right now I think on the cusp of exiting to the third wave. And wave three in my mind now goes beyond the flash array. Wave three is characterized by four attributes. First is around the acceleration of applications and that includes compute, storage, network, right? It's across the board. Second is simplification. The world continues to move faster. You got to make it simple. People have other things to do than manage infrastructure. Third is managing your risk. That is access to the data, integrity of the data. And fourth is investments. Two elements of investments here Dave, how do you invest into the IT asset that you're trying to purchase? And as that investment matures over time, how does it stay fresh and stay current? Okay, good. So we're going to dig into some of those. But before we do, let's go to Enga. Tell us a little bit about Varner. Varner is a retail fashion company that is based in the headquarter in Norway. But we're having around 1,600 stores across the northern part of Europe today. We are having 12 different brands. So they're both competing with each other and also supplementing each other. And obviously online as any retailer is driving a big component of your business. Can you talk about that shift? What's happening with digital and what role Flash is playing? We're seeing that the online business is in the beginning, it will be growing quite fast. But the main reason for us to go to Flash is that the amount of data is growing. And with more and more stores, we are in retail fashion. We are having approximately more than one million unique items that we want to do big data analytics around. Customer loyalty. It's also a huge driver regarding the amount of data that you want to analyze and you want to keep track of the customers. And then all of us want to have a fast response when you're starting an application or whatever. You want to have the answer right away and then you need the right storage. How is this changing the retail experience for your customers? I think that we're still in the beginning regarding the changes. But it will be more and more that when you're going to a store, you are bringing your mobile device with you. The mobile device will be a companion. You are going to use your device to get additional information. You're already, today, you're using your phone to look at alternatives when you are in a store to compare the goods that you're looking at, what are our other stores doing? Are they a better offer somewhere else? But in the retail fashion, we are looking at what this could give you additional value or information about the product. Since we are in fashion and producing clothes, information about where is actually the garment being produced? What is the fabrics in the garment? Everything that you want to know as a customer, you want to know more and more. Why are you here talking about flash? We discover that. We ended up to have a problem regarding how far could you actually scale out with a number of disk drives? You needed to have something that had a better response time. It's more or less that you're expecting, or employees expect the same as all of us is expecting at home. When you're clicking on the up on the telephone, you want instant response. To be able to actually do a extreme, complex analytics in a database, you need to have, one thing is what could you do in the memory of this database server or the application servers? But you also need to look up something that is stored in a database, that is stored in a storage system, and then you need a storage system is extremely fast. And it's really an analytics play is why you sort of went to flash and what are you doing with the analytics specifically?  Are you bringing transactions and analytics together? It's the amount of analytics is growing year by year and at the same time moving or building more and more on a virtualized platform that is also increasing the demands for to have a storage system that is fast. The growing amount of data in general, since we are a fashion company, we have a huge picture libraries that is adding more and more. So they're getting the de-deplication, the compression ratio that you're able to get in a flash system. So one thing is that to get the performance in packed on larger and larger databases, the dollar is also how to cover the rest of the business that we're also having in the data center. What are you seeing in terms of de-duplication and compression or data reduction rates? It's up to 1.9 in the overall when you're combining all of the different type of compression ratio that are having in the system. The other case now alone is up to 1.3, but in overall we're seeing the 1.9. And as a result, your cost of flashes at parity with spinning disk, lower than spinning disk? More or less when we did the last investment, we saw that we didn't have any really good alternatives. We're having the costs having everything from the electricity bill, the space, actually to put up a system, the number of racks that you need, and the prices was, we are seeing more and more that it was competing and we've mentioned that the new offerings that is coming with the recent gigabyte, it will completely change. It's close enough and simpler and more efficient from an energy standpoint that it doesn't have to necessarily even cross over. So in the last year we were running three different platforms and with the new offerings, we had the possibility to move on and do the consolidation again that we could have a mixed workload. You're getting more and more into the situation where you had to build one environment for the virtual environment, one for a standard clustering environment, one for databases, with all flash and the power that you're getting there, you can actually more flexible move the data around. This sort of goes back to what you were saying about simplicity, so how is Werner seeing simplicity payoffs from the flash investment? You know, in the industry that they're in, right, I mean, just coming off the Thanksgiving holiday here in the U.S., you know, we see, I think we saw a record year with online sales and I think the retail outlets now are trying to marry, right? One interesting example that we saw was a customer comes into the store. Of course, he can see and feel the material but they can take a photograph of him and they can now simulate how different looks and clothes look on him at the store with someone giving you the advice, right? So it's not yourself looking at an image on a computer screen that's there in the store, but then there's a person there that can advise you and say that looks really good on you, that doesn't look so good on you, right? Now, to do that kind of infrastructure in a store, right, really means that you've got to have very simple operations. You've got to really be able to allow people to focus on those kinds of attributes of what a customer looks like versus the infrastructure. So, but what's simpler about managing flash? Why is flash simpler to manage? It is simpler to manage because traditional systems require a lot of tweaking. They're required, the database guy, to talk to the storage guy, to talk to the networking guy. Now, many of our customers are reporting that that has gone away. So the bottlenecks? It works, it just works. There isn't the need to constantly change, tweak, respond to spikes, and flash just takes that all away. They can go focus on higher value things. Talk about the risk mitigation dimension. Now, as you're collecting more and more data, to do data analytics, for example, to drive those insights, how do you protect that data, right? And you know, we've all heard about break-ins here in the last few weeks on data security, data breaches. So that protecting the access to the data is very key. That's a managing your risk there, especially if you keep all this information, right? And then how do you protect that data over time in the wake of disasters, failures? And so, you know, as that data bank grows larger and larger, it becomes a valuable asset. You don't want to get into the wrong hands and you don't want to lose it.  So what kind of impacts have you seen, even at a high level as a result of Flash, roughly performance, business outcomes, anything you can share? I think that the most important thing is that we have seen is that we could simplify the platform regarding we didn't need to consider what kind of storage do we need to deploy a specific type of application? If we want to spin up a new database now, we could just spin it up. We could use the standard automatization tools that we're having and they don't need to consider are we on the right storage or not? Do we need to deploy this on a specific virtualization farm or do you need to have dedicated hardware? What is the delivery time? Today, we could just decide that we need a new system tomorrow and we can spin it up today. One of the benefits of Flash is a reduction in duplication in database copies. Have you found that that has been a significant benefit for you? Yeah, based on the overall figures, we're seeing that we're getting a huge benefit regarding the D-duplication ratio, the 1.9 ratio that I mentioned earlier. If I can add to that point, let's de-duplication, I'm thinking of just having to create copies of the database for development and product analytics. Yeah, the same copy as opposed to having to create copies. More or less we are restoring or we are actually copying data around, we are copying production data to do real-time performance testing before we're deploying new releases into production. We don't have exact figures how much it's actually saving us, that's perhaps but you're still making copies as you used to as opposed to sharing out of that single data set, yeah, and that's also due to time that you want to be sure that everything is working. Yeah, okay, but so you're IT guy, you're conservative, that's what you got to make sure. Break it first. It's an emerging use case. But it is an emerging use case and that's what I wanted to ask you, Visho. You're starting to see people, certainly in development, you've seen that. You're seeing it sort of widely or? You're seeing more and more customers now recognize that Flash enables them to do something that they could not do before, right? It's the enable new way of working. So you have a notion of copies of database, more and more customers are starting to realize that there's performance headroom in the Flash. If they use Snapshot to make the copies, they don't have to make full physical copies. So there's a data reduction element of using Snapshots. And then there's of course the protection of those different copies by fencing them using some kind of QoS software so that you ensure one doesn't overtake the other. How about in terms of what you're seeing with regard to the way in which Flash is impacting the business? So you had talked about wave one being performance and I'm actually curious as to how what an anger situation is that performance or is it accelerating apps and what the difference is there? Yeah, and I think the wave one was performance as an overriding consideration, right? And without really considering all the other elements. Wave two said, I need the performance. I need the affordability. I need the data services, right? And that made it a little more mainstream because it brought three elements together. And now wave three, we're saying, look, it goes beyond because I'm now looking at accelerating all of my applications as opposed to just my performance critical applications. In fact, one of the customers we talked to Dave said, we really did not need the performance of Flash but because of the administrative savings because of the reduction in backup windows, we moved to Flash. There were other reasons as opposed to performance moving to Flash. Now I want you to go Flash, you'd never go back. So, okay, and let's talk about the competition. Did you look at other systems? Are you a pure HP shop, HPE? We're also running other storage systems but that is for specific applications. But since we have been a long time HPE customer and the experience that we had with the earlier edition of 3PAR, we did compare the prices. And we looked at all the alternatives but the truth is part of the 3PAR was the best platform for us. When you were doing hybrid, I saw in your presentation, you were doing hybrid but it was just too cumbersome, you're moving stuff around and tearing, it wasn't working for you. Was that a 3PAR hybrid or was it an alternative? The solution we had there was running on the P9500 and the there was more or less the complexity regarding smart clearing, storage pools, licensing issues. So that's one of the benefits with the new 3PARs are all Flash that you don't have any of those statistics regarding to look into what is the lies and what is the storage pool they are running on. Just collapse all that. So let's talk about the competition here. So 3PAR came out, the interesting thing about 3PAR is you had a full stack, robust, hardened storage service stack. That gave you an advantage. Obviously EMC is a leader here, you're pure, the upstart, NetApp is now using its install base to convert to Flash. Where do you see your competitive position, Dish? So I see our competitive positioning growing because we're bringing now several elements together. If you look at acceleration, for example, right, how do we take the next wave of application acceleration? Well, one of the things we're showcasing on the floor this week, Dave, is something called 3D Cache and it's technology with HP and Intel around 3D cross points where we can now accelerate all flash arrays, right? And so that's one area of acceleration, accelerating the network. We've just announced this week as well, a whole still 32 gig fiber channel infrastructure, 25 gig ethernet on the horizon. And so when we can bring all of the elements across compute, networking and storage together to deliver that application outcome, that's a strength that very few companies can match. You're Brethren at HP, it's called Hewlett-Packard Labs. I thought it was HPE Labs. But anyway, the science says Hewlett-Packard Labs, regardless, they're working on some cool stuff, potentially to replace Flash. Are you expecting that? Are you just assuming Flash is here until somebody proves that there's something better? I think that's the rise of what some people are calling now storage class memories. On the server side, we have also seen something what we call persistent memories, right? And I think we're seeing sort of a collapse of the memory hierarchy. And we're fully expecting there's going to be a solid state 2.0 with storage class memories. I don't think Flash is dead. I think Flash continues to have a life. And the early phases of storage class memory in my mind, Dave, are going to be focused in more memory use cases, like expanding the size of the cache. Like in the case of persistent memory on the service, we're also seeing byte addressability on something like SQL Server 2016 to drive acceleration. So if we can bring now the acceleration in servers, the acceleration in storage, the storage class memory, the network, you've got to trace that end to end path of the IO across the entire stack. Okay, so, so Memrister maybe starts in the system.  My prediction is that you're going to see storage class memories, different kinds of technology start first with the memory use case. It's going to be larger capacity than traditional DRAM memory. It's going to be persistent, of course. But, you know, it'll be lower priced, right? But not low priced enough yet to go replace the Flash tier. At least not initially. Well, because of the consumer volumes especially. Over time as volumes increase, as production levels increase, you'll see it drive prices down, drive capacities up, and then it'll go down the stack that way. Would you agree we're a decade away from that, from in terms of impacting Flash, replacing Flash? I don't think it's as far as a decade Dave. You think it's sooner? I think it's five years. Okay, good. We'll follow up, you, me, and Floyer on that conversation. Okay, all right. I'd love it. Gentlemen, we're out of time. Thank you so much, Fish and Inga for coming on theCUBE. It was great to have you. All right, keep it right there. Everybody, Paul, Gil and I will be back with our next guest. We're live from the docks of London in the Atlantic, Cell London. This is theCUBE. We're right back.


Section 13 of Love Letters of Dorothea Osborne. This is a LibriVox recording. All LibriVox recordings are in a public domain. For more information or to volunteer, please visit LibriVox.org. Recording by Breathe. The Love Letters of Dorothea Osborne. Section 13. Letter 61. I promised in my last to write again before I went out of town, and now I'll be good as my word. They are all gone this morning, and have left me much more at liberty than I have been of late. Therefore, I believe this will be a long letter, perhaps too long, at least if my letters are as little entertaining as my company is. I was carried yesterday abroad to a dinner that was designed for Merth, but it seems one ill-human person in the company is enough to put all the rest out of tune. For I never saw people perform what they intended was, and could not forbear telling themselves. But to excuse themselves and silence my reproaches, they all agreed to say that I spoiled their jollity by wearing the most unreasonable looks that could be put on for such an occasion. I told them I knew no remedy, but leaving me behind next time, and could have told them that my looks were suitable to my fortune, though not to a feast. Fee, I have gotten to my complaining humour that tires myself as well as everybody else, and which, as you observe, helps not at all. Would it would leave me, and then I could believe I shall not always have occasion for it. But that's in nobody's power, and my Lady Talmush, that says she can do whatsoever she will, cannot believe whatsoever she pleases. It's not unpleasant, me thinks, to hear her talk, how at such a time she was sick, and the physicians told her that she would have the smallpox, and showed her where they were coming out upon her. But she bethought herself that it was not at all convenient for her to have them at that time, some business she had that required her going abroad, and so she resolved that she would not be sick, nor was not. Twenty such stories as these, she tells, and then falls into discoveries of strengths of reason and the power of philosophy, till she confounds herself in all that hear her. You have no such ladies in Ireland? Oh, me, but I heard today, your cousin Hammond is going thither to be in Ludlow's place. Is it true? You tell me nothing what is done there. That is no matter. The less one knows of state affairs, I find it is the better. My poor Lady Vavasor is carried to the tower, and her great belly could not excuse her, because she was acquainted by somebody, that there was a plot against the protector, and did not discover it. She has told now all that was told her, but vows she will never say from whence she had it. We shall see whether her resolutions are as unalterable as those of my Lady Talmash. I wonder how she behaved herself when she was married. I never saw anyone yet that did not look simply and out of countenance, nor even knew a wedding well designed, but one, and that was of two persons where time enough I confessed to contrive it, and nobody to please in but themselves. He came down into the country where she was upon a visit, and one morning married her. As soon as they came out of the church, they took coach and came for the town, dined at an inn by the way, and at night came into lodgings that were provided for them where nobody knew them, where they passed for married people of seven years standing. The truth is, I could not endure to be Mrs. Bride in a public wedding to be made the happiest person on earth. Do not take it ill, for I would endure it if I could rather than fail, but in earnest I do not think it were possible for me. You cannot apprehend the formalities of a treaty more than I do, not so much the success on it. Yet, in earnest, your father will not find my brother Peyton wanting in civility, though he is not a man of much compliment, unless it be in his letters to me. Nor an unreasonable person in anything, so he will allow him out of his kindness to his wife to set a higher value upon her sister than she deserves. I know not how he may be prejudiced as to the business, but he is not deaf to reason when to his civility delivered and is as easily gained with compliance and good usage as anybody I know, but by no other way. When he is roughly dealt with, he is, like me, ten times the worst for it. I make it a case of conscience to discover my faults to you as fast as I know them, that you may consider what you have to do. My aunt told me, no longer gone than yesterday, that I was the most willful woman that ever she knew and had an obstinacy of spirit nothing could overcome. Take heed, you see, I give you fair warning. I have missed a letter this Monday. What is the reason? By the next I shall be gone into Kent and my other journey is laid aside, which I am not displeased at because it would have broken our intercourse very much. Here are some verses of Cowleys. Tell me how you like them.  The whole is very long and is a description of or rather a paraphrase upon this friendship of David and Jonathan. Tis, I think, the best I have seen of his and I like the subject because Tis, that would be perfect in. I do. Just reverse, Dorothy Osborne. Letter 62, June the 26th, 1654. I told you in my last that my Suffolk journey was laid aside and that into Kent hastened. I am beginning it today and I have chosen to go as far as graves and by water, though it be very gloomy weather. If I drown, by the way, this will be my last letter and, like a will, I bequeath all my kindness to you in it.  I am in such a haste that I can say little else to you now. When you are come over, we'll think where to meet. For at this distance I can design nothing. Only I should be as little pleased with the constraint of my brother's house as you. Pray let me know whether your man leaves you and how you stand inclined to him I offer you. Indeed, I like him extremely and he is commanded to me by people that know him very well and are able to judge for a most excellent servant and faithful as possible. I'll keep him unengaged till I hear from you. I do. My next shall make amends for the short one. P.S., I received your last of June 22nd since I sealed up my letter and I does not but make an excuse for another short one. After you have cheated me so, for those you have received already. Indeed, I could not help it, nor can I now, but if that will satisfy, I can assure you I shall make a much better wife than I do a husband if I ever am one. Pardon, my shaker, au motant. Adieu mon ami. Je vous souhaite à ce qu'il vous désire. V.O. Letter 63. July the 4th, 1654. Because you find fault with my other letters, this is like to be shorter than they. I did not intend it so though, I can assure you. But last night, my brother told me he did not send his till 10 o'clock this morning and now he calls for mine at 7, before him up and I can only be allowed time to tell you that I am in Kent and in a house so strangely crowded with company that I am weary as a dog already. Though I have been here but three or four days that all their must has not mended my humour that I am here the same I was in other places that I hope merely because you bid me and lose that hope as often as I consider anything but yours. Would I were easy of belief? They say one is so to all that one desires. I do not find it. Though I am told I was so extremely when I believed you loved me that I would not find and you have only power to make me think it. But I am called upon. How faint would I say more. It is all but the saying with more circumstance than I am. Your faithful friend and servant, directed for your master. That's a 64. I see you can chid when you please and with authority but I deserve it I confess and all I can say for myself is that my fault preceded from a very good principle in me. I am apt to speak what I think and to you have so accustomed myself to discover all my heart that I do not believe it will ever be the power to conceal a thought from you. Therefore I am afraid you must resolve to be vexed with all my senseless apprehensions as my brother Peyton is with some of his wives. Who is thought a very good woman but the most troublesome one in a coach that ever was we dare not let our tongues lie more on one side of our mouths than the other for fear of overturning it. You are satisfied I hope at this that I escaped drowning however there's not a miss that my will made you know now how to dispose of all my wealth whensoever I die but I am troubled much you should make so ill a journey to so little purpose indeed I read by the first post after my arrival here and cannot imagine how you came to miss of my letters. Is your father returned yet to think of coming over immediately? How welcome you will be but alas I cannot talk on at the rate that you do I am sensible that such an absence is misfortune enough but I dare not promise myself that it will conclude ours it is more my belief that you yourself speak it rather to encourage me into your wishes than your hopes my humour is so ill at present that I dare say no more or less you chide me again I find myself fit for nothing but to converse with a lady below that is fallen out with all the world because her husband and she cannot agree tis the pleasantest thing that can be to hear us discourse she takes great pain to dissuade me from ever marrying and says I am the various fool that ever lived if I do not take her counsel now we do not absolutely agree in that point but I promise her never to marry unless I can find a husband as I describe to her and she believes is never to be found so that upon a matter we differ very little when so ever she is accused of maintaining opinions very destructive of society and absolutely prejudicial to all the young people of both sexes that live in the house she calls out me to be her second and by it has lost me the favour of all our young gallants who have got a custom of expressing anything that is nowhere but in fiction by the name of Mr. Oh's husband for my life I cannot beat into their heads a passion that must be subject to no decay an even perfect kindness that must last perpetually without the least intermission they laugh to hear me say that one unkind word would destroy all the satisfaction of my life and that I should expect our kindness should increase every day if it were possible but never lessen all this is perfect nonsense in the opinion but I should not doubt the convincing them if I could hope to be so happy as to be yours faithful friend and servant Dorothy Osborne letter 65 how long this letter will be I cannot tell you shall have all the time that is allowed me but upon condition that you shall not examine the sense on too strictly for you must know I want sleep extremely the sun was up an hour before I went to bed today and this is not the first time I have done this since I came hither to not be for your advantage that I should stay here long for in earnest I shall be good for nothing if I do we go abroad all day and play all night and say our prayers when we have time well in sober earnest now I would not live thus a 12 months to gain all that the king has lost unless it were to give it him again just a miracle to me how my brother endures it this is contrary to his humor as darkness is to light and only shows the power he lets his wife have over him will you be so good nature he has certainly as great a kindness for her as can be and to say truth not without reason but all the people that ever I saw I do not like his carriage toward her he is perpetually wrangling and finding faults and to a person that did not know him would appear the worst husband in the most imperious in the world he is so among his children too though he loves them passionately he has one son and is the finest boy that ever you saw and has a noble spirit but yet stands in that awe of his father that one word from him is as much as 20 whippings you must give me leave to entertain you thus with discourses of the family for I can tell you nothing else from hence yet now I remember I have another story for you you little think I have been with Lily and in earnest I was the day before I came out of town and what do you think I went for not to know when you would come home I can assure you nor for any other occasion of my own but with a cousin of mine that had long designed to make herself sport with him and did not miss of her aim I confess I always thought him an imposter but I could never have imagined him so simple a one as we found him in my life I never heard so ridiculous a discourse as he made us and no old woman who passes for a witch could have been more puzzled to seek what to say to reasonable people than he was he asked us more questions than we did him and caught at everything we said without discerning that we abused him and said things purposely to confound him which we did so perfectly that we made him contradict himself the strangest it ever you saw ever since this adventure I have had so great a belief in all things of this nature that I could not forbear laying a peas cot with nine peas in it under my door yesterday and was informed by it that my husband's name should be Thomas how do you like that but what Thomas I cannot imagine the servants I have got since I came hither I know none of that name here is a new song I do not send it to you but to your sister the tune is not worth the sending so far if she pleases to put any to it I'm sure it will be a better than it has here I do your faithful friend and servant Dorothy hospital end of section 13 recording by Breathe Kuala Lumpur in Malaysia section 14 of Love Letters of Dorothy Osborne this is a LibriVox recording all LibriVox recordings are in the public domain for more information or to volunteer please visit LibriVox.org recording by Rhonda Fetterman the Love Letters of Dorothy Osborne section 14 Letter 66 July 20th 1654 I am very sorry I spoke too late for I am confident this was an excellent servant he was in the same house where I lay and I had taken a great fancy to him upon what was told me of him and what I saw the poor fellow too was so pleased that I undertook to inquire at a place for him that though mine was as I told him uncertain yet upon the bear hopes on it he refused two or three good conditions but I shall set him now at Liberty and not think at all the worse for him for his good nature sure you go a little too far in your condemnation on it I know it may be abused as the best things are most subject to be but in itself is so absolutely necessary that where it is wanting nothing can recompense the miss on it the most contemptible person in the world if he has that cannot be justly hated and the most considerable without it cannot deserve to be loved would to God I had all that good nature you complain you have too much of I could find ways enough to dispose on it amongst myself and my friends but is well where it is and I should sooner wish you more on it than less I wonder with what confidence you can complain of my short letters that are so guilty yourself in the same kind I have not seen a letter this month which has been above half a sheet never trust me if I write more than you that live in a desolated country where you might finish a romance of ten tomes before anybody interrupted you I that live in a house the most filled of any since the arc and where I can assure you one has hardly time for the most necessary occasions well there was never any one thing so much desired and apprehended at the same time as your return is by me it will certainly I think conclude me a very happy or a most unfortunate person sometimes me thinks I would feign know my doom whatever it be and at others I dread it so extremely that I am confident the five portacles and the three plotters which were the other day condemned by the High Court of Justice had not half my fears upon them I leave you I leave you to judge the constraint I live in what alarms my thoughts give me and yet how unconcerned this company requires I should be they will have me at my part in a play the lost lady it is and I am she pray God it be not an ill omen I shall lose my eyes anew this letter if I make it longer farewell I am your faithful friend and servant Dorothy Osborne Letter 67 I wonder you did not come before your last letter to as dated the 24th of August but I received it not till the first of September would to God your journey were over every little storm of wind frights me so that I pass here for the greatest coward that was ever born though in earnest I think I am as little so as most women yet I may be deceived too for now I remember me you have often told me I was one and sure you know what kind of heart mine is better than anybody else I am glad you were pleased with that description I made of you of my humor for though you had disliked it I am afraid to has passed my power to help you need not make excuses neither for yours no other would please me half so well that gaiety which you say is only esteemed would be insupportable to me and I can as little endure a tongue that's always in motion as I could the click of a mill of all the company this place is stored with there is but two persons whose conversation is at all easy one is my eldest niece who sure was sent into this world to show to as possible for a woman to be silent the other a gentleman whose mistress died just when they should have married and though to as many years since one may read it in his face still his humor was very good I believe before that accident for he will yet say things pleasant enough but his so seldom that he speaks at all and when he does his with so sober a look that one may see he is not moved at all himself when he diverts the company most you will not be jealous though I say I like him very much if you were not secure in me you might be so in him he would expect his mistress should rise again to reproach his inconstancy if he made court to anything but her memory me thinks we three that is my niece and he and I do become this house the worst that can be unless I should take into the number my brother Peyton himself to for to say truth his for another sort of melancholy is not less than ours imagine we did this last week when to our constant company there was added a colonel in his lady a son of his and two daughters a maid of honor to the queen of Bohemia and another colonel or a major I know not which besides all the tongue they brought with them the men the greatest drinkers that ever I saw which did not at all agree with my brother who would not be drawn to it to save a kingdom if it lay at stake and no other way to redeem it but in earnest there was one more to be pitied besides us and that was colonel Thornhill's wife as pretty a young woman as I have seen she is Sir John Greenville's sister and has all his good nature with a great deal of beauty and modesty and wit enough this innocent creature is sacrificed to the various beast that ever was the first day she came hither intended it seems to have come with her but by the way called in to see an old acquaintance and bid her go on he would overtake her but did not come till next night and then so drunk he was led immediately to bed with her she was to follow him when she had sucked I blessed myself at her patience as you may do that I could find anything to fill up this paper with all I do your faithful friend and servant Dorothy Asmoren Letter 68 I did so promise myself a letter on Friday that I am very angry I had it not though I know you are not to come to town when it should have been rid but did you not tell me you should not stay above a day or two what is it that has kept you longer I am pleased though that you are out of the power of so uncertain things as the winds and the sea which I had for myself but did extremely apprehend for you you will find a packet of letters to read and maybe have met with them already if you have you are so tired that it's but reasonable I should spare you in this for to say truth I have not time to make this longer besides that if I had my pen is so very good that it writes an invisible hand I think I am sure I cannot read it myself if your eyes are better you will find that I intended to assure you I am your faithful friend and servant Dorothy Asmoren Letter 69 I am but newly waked out of an unquiet sleep and I find it so late that if I write at all it must be now some company that was here last night kept us up till three o'clock and then we lay three in a bed which was all the same to me as if we had not gone to bed at all since dinner they are all gone and our company with them part of the way and with much ado I got to be excused that I might recover a little sleep but I am so moped yet that sure this letter will be nonsense I would feign tell you though that your father is mistaken and that you are not if you believe that I have all the kindness and tenderness for you my heart is capable of let me assure you whatever your father thinks that had you twenty thousand pounds a year I could love you no more than I do and should be far from showing it so much lest it should look like a desire of your fortune which as to myself I value as little as anybody in the world and in this age of changes but certainly I know what an estate is I have seen my father's reduced better than twenty thousand pounds to not four hundred pounds a year and I thank God I never felt the change in anything that I thought necessary I never wanted nor am confident I never shall but yet I would not be thought so inconsiderate a person is not to remember that it is expected from all people that have sense that they should act with reason that to all persons some proportion of fortune is necessary according to their several qualities so it is not required that one should tie oneself to just so much and something is left for one's inclination and the difference in the persons to make yet still within such a compass and such as lay more upon these considerations than they will bear shall infallibly be condemned by all sober persons if any accident out of my power should bring me to necessity though never so great I should not doubt with God's but to bear it as well as anybody and I should never be ashamed on it if he pleased to send it me but if by my own folly I had put it upon myself the case would be extremely altered if ever this comes to a treaty I shall declare that in my own choice I prefer you much before any other person in the world and all that this inclination in me in the judgment of any persons of honour discretion will bear I shall desire may be laid upon it to the uttermost of what they can allow and if your father pleased to make up the rest I know nothing that is like to hinder me from being yours but if your father out of humour shall refuse to treat with such friends as I have let them be what they will it must end here for though I was content for your sake to lose them and all the respect they had for me yet now I have done that I'll never let them see that I have so little interest in you and yours as not to prevail that my brother may be admitted to treat for me sure when a thing of course and so much reason as that unless I did disclose to all the world he were my enemy it must be expected when so ever I dispose of myself he should be made no stranger to it when that shall be refused me I may be justly reproached that I deceived myself when I expected to be at all valued in a family that I am a stranger to or that I should be considered with any respect because I had a kindness for you that made me not value my own interests I doubt much whether all this be sense or not I find my head so heavy but that which I would say is in short this if I did say once that my brother should have nothing to do in it it was when his carriage towards me gave me such an occasion as could justify the keeping that distance with him but now it would look extremely unhandsome in me and sure I hope your father would not require it of me if he does I must conclude he has no value for me and sure I never disobliged him to my knowledge and should with all the willingness imaginable serve him if it lay in my power good God what an unhappy person am I all the world is so almost just now they are telling me of a gentleman near us that is the most wretched creature made by the loss of a wife that he passionately loved that can be if your father would but in some measure satisfy my friends that I might but do it in any justifiable manner you should dispose me as you pleased carry me wither you would all the places of the world would be alike to me where you were and I should not despair of carrying myself so towards him as might deserve a better opinion from him I am your faithful friend and servant the as-born letter 70 my doubts and fears were not at all increased by that which gives you so many nor did I apprehend that your father might not have been prevailed with to have allowed my brother's being seen in the treaty for as to the thing itself whether he appears in it or not will be the same he can not but conclude my brother Peyton would not do anything in it without the other's consent I tend to share in your father's kindness as having nothing in me to merit it but as much a stranger as I am to him I should have taken it very ill if I had desired it of him and he had refused it me I do not believe my brother has said anything to his prejudice unless it were in his persuasions to me and there it did not injure him at all if he takes it ill that my brother appears so very averse to the match that he was the same and nothing less than my kindness for you could have made me take so patiently as I did his saying to some that knew me at York that he was forced to bring you thither and afterwards to send you over lest you should have married me this was not much to my advantage nor hardly civil I think to any woman yet I never so much as took the least notice on it nor had not now but for this occasion yet sure it concerns me to be at least as nice as he in point of honour I think it is best for me to end here lest my anger should make me lose that respect I would always have for your father and for not a miss I think that I devoted it all towards you for being so idle as to run out of your bed to catch such a cold if you come hither you must expect to be chidden so much that you will wish you had stayed until we came up when perhaps I might have almost forgot half my quarrel to you at this present I can assure you I am pleased with nobody but your sister and her I love extremely and will call her pretty say what you will I know she must be so though I never saw more of her than what her letters show she shall have two spots carriage dogs if she please for I had just such another friend or anything else that is in the power of your faithful friend and servant Dorothy Osborn letter 71 Monday, October the 2nd 1654 after a long debate with myself how to satisfy you and remove that rock as you call it which in your apprehensions is of so great danger I am at last resolved to let you see that I value your feelings for me at as high a rate as you yourself can set it and that you cannot have more of tenderness for me and my interest than I shall ever have for yours the particulars how I intend to make this good you shall know when I see you which since I find them here more irresolute in point of time though not as to the journey itself then I hope they would have been not withstanding your quarrel to me and the apprehension you would make me believe you had that I do not care to see you pray come hither and try whether you shall be welcome or not in sober earnest now I must speak with you and to that end if your occasions will serve come down to Canterbury send someone when you are there and you shall have further directions you must be contented not to stay here above two or three hours I shall tell you my reason when you come inform yourself of all that your father will do on this occasion that you may tell it me only therefore let it be plainly and sincerely what he intends and all I will not hinder your coming away so much as the making this letter a little longer my take away from your time in reading it it is enough to tell you I am ever your faithful friend and servant Dorothy Osborne end of section 14 recording by Rhonda Fetterman section 15 of Love Letters of Dorothy Osborne this is a LibriVox recording all LibriVox recordings are in the public domain for more information or to volunteer please visit LibriVox.org the Love Letters of Dorothy Osborne section 15 letter 72 you all like to have an excellent housewife of me I am a bad still and slept so soundly nothing but your letter could have waked me you shall hear from me as soon as we have dined farewell can you endure that word no out upon it I'll see you annan letter 73 fire upon it I shall grow too good now I am taking care to know how your worship slept tonight better I hope than you did the last send me word how you do and don't put me off with a bit of a note now you could write me a fine long letter when I did not deserve it half so well letter 74 you are mistaken if you think I am in debt for both these days Saturday I confess was devoted to my lady but yesterday though I risked with good intentions of going to church my cold would not suffer me but kept me prisoner all the day I went to your lodging to tell you that visiting the sick was part of the work of the day but you were gone and so I went to bed again while your letter found me this morning but now I will rise and dispatch some visits that I owe that tomorrow may be entirely yours letter 75 I find my conscience a little troubled till I have asked your pardon for my ill humor last night will you forgive it me in earnest I could not help it but I met with a cure for it my brother kept me up to hear his learned lecture till after two o'clock and I spent all my ill humor upon him and yet we parted very quietly and looked as if a little good fortune might make us good friends but your special friend my elder brother I have a story to tell you of him will my cousin have come think you send me word it may be it was a compliment if I can see you this morning I will but I dare not promise it letter 76 so this is to tell you that you will be expected tomorrow morning about nine o'clock at a lodging over against the place where chairing cross stood and two doors above ye go tavern if with these directions you can find it out you will there find one that is very much your servant Dorothy Osborne letter 77 now I have got the trick of breaking my word I shall do it every day I must go to Ruhampton today but it's all one you do not care much for seeing me well my master remember last night you swaggered like a young lord I'll make your stomach come down rise quickly you had better and come hither that I may give you a lesson this morning before I go letter 78 I have slept as little as you and may be allowed to talk as unreasonably yet I find I'm not quite senseless I have a heart still I have a heart still I have a heart I have a heart I have a heart I have a heart I have a heart I have a heart I have a heart I have a heart still that cannot resolve to refuse you anything within its power to grant but lord when shall I see you people will think me mad if I go abroad this morning after having seen me in the condition I was in last night and they will think it's strange to see you here could you not stay till they are all gone to Ruhampton and they go this morning I do but ask though do what you please only believe you do a great injustice if you think me false I never resolved to give you an eternal farewell but I resolved at the same time to part with all the comfort of my life and whether I told it you or not I shall die yours tell me what you will have me do letter 80 here comes the note again to tell you I cannot call on you tonight I cannot help it and you must take it as patiently as you can but I am engaged tonight at the three rings to sap and play poor man I am sorry for you in earnest I shall be quite spoiled I see no remedy think whether it were not best to leave me and begin a new adventure End of section 15 Recording by Ezoa in Belgium in May 2009 Section 16 of Love Letters of Dorothy Osbourne this is a LibriVox recording or LibriVox recordings are in the public domain for more information or to volunteer please visit LibriVox.org Recording by Ruth Golding The Love Letters of Dorothy Osbourne Section 16 81 The Hague October 31st 1670 My dearest heart I received yours from Yarmouth and was very glad you made so happy a passage it is a comfortable thing when one is on this side to know that such a thing can be done in spite of contrary winds I have a letter from P who says in character that you may take it from him that the Duke of Buckingham has begun a negotiation there but what success in England he may have he knows not that it were to be wished our politicians at home would consider well that there is no trust to be put in alliances with ambitious kings especially such as make it their fundamental maxim to be base these are bold words but they are his own besides this there is nothing but that the French king grows very thrifty that all his buildings except fortifications are ceased and that his payments are not so regular as they used to be the people here are of another mind they will not spare their money but are resolved at least the states of Holland if the rest will consent to raise fourteen regiments of foot and six of horse that all the companies both old and new shall be of a hundred and twenty men that used to be of fifty forty-five nothing is talked of but these new levees and the young men are much pleased Downton says they have strong suspicions here you will come back no more and that they shall be left in the lurch that something is striking up with France and that you are sent away because you are too well inclined to these countries and my cousin Temple he says told him that a nephew of Sir Robert Longs who has lately come to you trecht told my cousin Temple three weeks since you were not to stay long here because you were too great a friend to these people and that he had it from Mr. Williamson who knew very well what he said my cousin Temple says he told it to Major Scott as soon as he heard it and so it is like you knew it before but there is such a want of something to say that I catched everything I am my best dears most affectionate D.T. 82 Sir, I deferred writing to you till I could tell you that I had received all my fine things which I have just now done but I thought never to have done giving you thanks for them they have made me so very happy in my new clothes and everybody that comes does admire them above all things but yet not so much as I think they deserve and now if Papa was near I should think myself a perfect Pope though I hope I should not be burned as there was one at Nell Gwynne's door the fifth of November who was set in a great chair with a red nose half a yard long with some hundreds of boys throwing squibs at it Mr. Gore and I agree mighty well and he makes me believe I shall come to something at last that is if he stays which I don't doubt but he will because all the fine ladies will petition for him we are got rid of the workmen now and our house is ready to entertain you come when you please and you will meet nobody more glad to see you than your most obedient and dutiful daughter the temple 83 to Sir John Osbourne thanking him for his consolation on the death of her son Sheen May the 6th 1689 Dear nephew I give you many thanks for your kind letter and the sense you have of my affliction which truly is very great but since it is laid upon me by the hand of an almighty and gracious God that always proportions his punishments to the support he gives with them I may hope to bear it as a Christian ought to do and more especially one that is conscious to herself of having many ways deserved it the strange revolution we have seen might well have taught me what this world is yet it seems it was necessary that I should have a near example of the uncertainty of all human blessings that so having no tie to the world I may the better prepare myself to leave it and that this correction may suffice to teach me my duty must be the prayer for affectionate aunt and humble servant D. Temple End of section 16 and end of the Love Letters of Dorothy Osbourne


Hi everyone, my name is William. This talk is Kuda in your Python. So I'm going to talk to you a little bit about how we can start programming on the GPU from the safety of our Python program in the language we're familiar with. So I want to start off with some bad news. Moore's Law is dead. This is kind of a tough one. So Moore's Law, what was it? Basically an idea that the number of transistors that you can fit on an integrated circuit would double every two years. Initially, it was every one year actually. He had to revise that. And this is Gordon Moore, namesake of the law. And so he based it on this data. So you can see this graph on the left side. It's a log scale. So the linear nature of it says that it's doubling. And you can see this held from like the 50s, 60s, 70s. This actually went up all the way till the 2016. This is with some like actual data. So you can see that relationship pretty much holds true. I mean, it's doubling and doubling up until 2016. But honestly, we're starting to hit a plateau. A lot of people like to write about it. There's a lot of headlines popping up. What are we doing now? Moore's Law is dead, all these things. And you might ask, is this really true? And I'll say, I trust this guy. This guy says, I guess I see Moore's Law dying here in the next decade or so. But that's not surprising. And who is this guy? This is Gordon Moore. He said that in 2015. So if he said it, I think we can start to buy into this idea that at least over the next, I mean, he said it in 2015. So over the next five years, we're going to start to see a plateau in, you know, getting more and more transistors onto these chips. And so this leads us to the question, why am I up here talking to about GPUs? And how can they help us kind of combat this problem that we're facing? So a little bit about the history of the GPU. It's a graphics processing unit. It was originally developed for gaming uses. The typical work load involves a lot of arithmetic on like a lot of pixels, you might imagine, or a lot of objects that are in a frame to do rendering and shading. And it's specialized for matrix operations, because if you can imagine a representation of a scene in a game, could be a matrix, a 2D matrix of pixels or even a 3D matrix, and then you're performing some transformations on them, operations like that. So that's kind of the background of why did people start manufacturing these devices in the first place? And so to start to understand even more the differences and how we might get some benefit from computation on the GPU, we can look at the specs. And these are two kind of top tier consumer grade GPU versus CPU. So on one side, we have NVIDIA's 2080 Ti, which came out pretty recently. And then on the other side, this is Intel's i9-9900K. So this is what they are. We can look at the specs. And so on the one hand, you can see the GPU has a ton more cores, even more processors. So that's over 4,000 CUDA cores across 68 streaming multi processors. Versus the Intel CPU has 8, it can get up to 16 hyper threads. But that still is very small in comparison to the GPU. But on the other hand, you look at the base clock and the boost clock. And you can see that the CPU, in terms of the clock speed, is achieving up to three times better performance than the GPU. So if we look at this diagram of the architecture, we can start to understand kind of why these things are the way they are and how the GPU can start to help us with certain workloads. So basically, you have the CPU architecture. You can see a large amount of it is related to control and caching. So these are two important pieces of how a CPU operates. You want it to interpret your if statements, your while loops, and also to be able to cache memory close to it so it doesn't have to go into RAM. And you can see relatively fewer of the transistors are allocated to arithmetic units, which is the green. In the GPU diagram, you can see relatively little of the transistors are dedicated to control and caching. And so more and more can be dedicated to arithmetic operations, which is why for simple arithmetic operations that don't involve a lot of control flow, the GPU can end up running a lot faster. And so kind of all those factors have led to the rise of what you call GPGPU, which is the idea that we can do general purpose computing on a GPU and not just use it for specialized purposes like video games graphics. And so this quote is from a paper published by NVIDIA in 2014. And basically was saying that that in the past we thought these devices are only good for gaming, for graphics, but now we can start to think of them as parallel processors, which is what they really are. And a bunch of the GPU companies started making their own kind of models of how to program these things. So CUDA, which is what I'm going to talk about today was developed by NVIDIA, but also AMD had app and OpenCL is kind of a growing open standard. And so these are different ways people are coming up with how we can turn this device that we have that has certain desirable properties into something that we can run general purpose workloads on. And so this kind of gets into, well, why am I interested in this? How did I come to be giving this talk up here? And so I'll start by talking a little bit about my work. So I work as an engineer on the data team at Compass. Compass is a real state technology platform basically bringing together the real estate agent with engineers who are building technology to empower them. And what I specifically work on is bringing in listing data from a bunch of different geographies. And then we transform it. We perform a lot of conversions and normalization. And so we use a lot of common tools you might see in data pipelines and data processing. So this includes Spark, Kafka, Airflow. But I also like to keep my ears to the ground in terms of what's going on in the industry around this tooling. And, you know, you start to read some interesting things. This is Rapids AI, which is partnered with NVIDIA. And their concept is that the GPUs might start to be used for this entire data processing workflow and not just for, say, model training, which is a place where they've started to be used. So you might actually be able to do your pre-processing, even visualization using the power of GPUs. So this is something that's in development. We might have GPU databases. This is just from this year. Uber built kind of a GPU powered database for doing analytics. So even in terms of what I work on professionally, there's a couple kind of advancements that might be, you know, putting GPUs into use for these kinds of data processing workloads. But it also relates to my hobbies, which include deep learning. So I kind of got hooked in it through the FAS AI deep learning course. I started doing some competitions on Kaggle. And this is kind of what got me hooked into thinking about these hardware questions. So this is my computer at home that I put together. Basically, after leaving a GPU running on AWS for one weekend, you get a pretty big bill and you're like, okay, maybe I should start to think about building one myself. Maybe some people have been there before. And so this is kind of what got me thinking about GPUs and CUDA on kind of a more general level, not just related to deep learning. And specifically, you know, I made a small pull request to PyTorch last year. And that's kind of what inspired this talk was this was moving one function basically from their Python into the C++ implementation. But just seeing kind of how that library was all put together and how they were able to kind of merge, you know, Python API with C++ and also CUDA programming, it was really fascinating to me. And so I wanted to kind of dive in and learn more. So that was part of the origin of this talk. So finally, I get to the question that everybody probably wanted to know, which is how can you start programming on the GPU? And so for an example, I've started out with NumPy. So this is this would run on the CPU. And those of you who are familiar kind of with NumPy might see we're taking a random basic vector of 10 million numbers, we're taking two of them and just adding them together, right? And so this is something that, you know, you could run and NumPy is pretty good at this, like what I benchmarked, it wasn't too large. So let's see what would the code look like the equivalent of this on the GPU. And, well, that's not much change, right? I'll go back to the other slide. And there's the other slide. And you're like, whoa. So this is from a library called QPy basically. And it tries to mirror the NumPy API. And it lets you start to take advantage of GPU processing in a pretty straightforward way. Like I said, just one more time, here's NumPy QPy.  And that's accounting for things like, you know, the GPU executes asynchronously, but you want to make sure you synchronize it. So you're seeing about a 30-time speed up, again, just from this change. And so that's part of why I think this is so cool, because I think, you know, how many people out there use NumPy for some things, right? You know, it's a pretty common tool in Python. And so, you know, if there's this drop-in replacement that would let you get these kinds of speed ups, like that might really help your workflow. And so that brings me into talking about kind of the outline of this talk. And I'm going to talk about different approaches to doing CUDA programming from your Python application. One, which I just showed you is as a drop-in replacement. Two is basically taking CUDA strings and compiling them in a Python program. And then the third one, which is kind of the most complex, is actually building it as a C++ extension to Python, which Python allows you to do. And, you know, as with a lot of things, I think, in programming, software development, these are kind of increasing levels of complexity. But what comes along with that complexity and kind of initial setup is it gives you additional flexibility. It might unlock features of the CUDA platform that aren't necessarily available in, say, a drop-in replacement, but that you might be able to access by kind of rolling your own. So to talk about drop-in replacement, the library I showed was, like I said, QPI, which is built as a drop-in replacement. It was originally developed for a deep learning framework called Chainr. It supports a lot of NumPy features, some of which are pretty, you know, complex, like the whole indexing system. I'm pretty sure they have it working just like NumPy. And NumPy does a lot of crazy things with that. Supports a bunch of different data types, broadcasting. There are a couple gotchas. So those of you who raise your hands who might want to think about dropping this into your program, these are things to watch out for. So it can't use data types that are strings or objects. This makes sense if you think about the kind of diagram I showed you that there's a ton of arithmetic units on the GPU. So they're going to be working on numbers, but maybe not so good for these other kinds of data. The other thing is array creation. So in NumPy, you can do NumPy.array over a list. It'll turn it into a 4. You can't do that. And then the last one, which really might trip you up, is if you sum a NumPy array, it's going to return a scalar. It's just one value. But in QPI, it returns a zero-dimensional array, which is going to be a little bit different. That is to say that these libraries are good, and I would definitely encourage you to try them out, but definitely keep in mind that there are certain things that might trip you up.  So the second way to do it, like I said, is that you can compile CUDA strings in your Python application. Before we talk about that, then we have to talk about the CUDA API, because compared to the drop-in, you're going to actually have to write some CUDA code. And so this is a diagram of the basic kind of building blocks of how CUDA programming is done. So on the top, you've got a grid. You've got blocks inside that, and then you've got threads inside your blocks. So to break it down a little bit, threads are the things that actually execute CUDA kernels, and they have a thread index, and what that's used for is basically to specify which part of the data that thread is meant to work on. And so this is from the body of a particular CUDA function, but you can see here, if you're executing over a two-dimensional matrix, you can basically have a thread index in the x and y axes, and that lets you specify, like, this thread is meant to take this element of the matrix and add it together. And you can imagine that this kind of simplifies the logic. If you've got a thousand threads, and I guess if you've ever tried to write some parallel code, there's kind of a lot of housekeeping that goes around keeping track of these thread indexes and which thread touches which part of the matrix. And a lot of that is built into this CUDA paradigm for you. So then blocks. Blocks is the next level up. Block is a group of threads. And the important thing is the blocks are required to be able to execute independently, but threads within a block can share data. There's kind of block level shared memory. And so if you do need to do some synchronization between your threads, that is possible on the block level. And just like the threads, the block also has dimensions and indexing. So you can do block index as well as the size of the block. And this is if you need to do kind of more complex computations of like what specific bit of this matrix is this thread supposed to operate on. Grids is something too fancy as a group of blocks. So going back to the diagram then, we kind of have these different levels and layers of being able to achieve parallelism. So from the lowest to the top, we've got threads which are executing the CUDA code, organized into these blocks, which again can also be arranged in this two-dimensional or three-dimensional space. So you see like the zero zero there is the index. So that block is indexed at zero zero and then one zero. So the grid itself is also a two-dimensional group of blocks. So those kind of threads, blocks and grids. So the other kind of piece of it when you get around to actually executing CUDA code is kernels. And that's basically C or C++ code that they've added a bit of extra syntax to. So specifically there's this global kind of identifier that you're used to specify your kernel function. And then there's this angle bracket syntax that lets you specify the grid size and the block size. So if we go back to here, obviously this is a parameter that you have control over. So you can say how many blocks go in my grid and then how many threads go in my block. And that's kind of one way to tune the performance. And so by using the syntax, you can kind of play around with that and see, well, what's going to be the most effective. So this is one example of what a kernel might look like. So this global identifier at the top here is saying this is the kernel. So this is what's going to execute on the GPU, whereas this main function is what executes on the CPU. And that's kind of the relationship in a CUDA program is you have your host, which is the CPU of your device, which is the term for the GPU. And basically your program starts executing on a CPU. And then as soon as it gets to one of these kernels that's going to be executed on device, it basically calls that and communicates and does data transfer across from the CPU to the GPU to be able to run this. And you can see here that at the top, the kernel is making use of these kind of terms I was talking about. So block index, block dimension, thread index to figure out, in this case, it's adding to two dimensional matrices, like figure out which piece of it the thread is actually meant to do work on. So that's kind of the high level overview of the CUDA API. So when we get to PyCuda, basically this was built by a researcher. It's used for a lot of scientific and research projects. There's even a research paper about this library, which is not necessarily something you see for all the code you find on GitHub. I was a little bit surprised. So what does it do? Basically, this is example code that kind of gets to the main thing that it gives to you as a programmer, which is you can take the CUDA kernel code. So if we go back here, this is what a kernel looks like. And this global function is what's going to execute on the device. That's what's going to execute on the GPU. You can basically pull that out and within your Python program supply that as a string to this source module object. And then there's an this get function call.  So this is one way that lets you start to write CUDA code, but you don't have to step out of a Python environment because all the objects and whatnot are still going to be just like in a Python program. And so this is one of the nice things is in PyCuda, you get automatic memory management. So basically, once something goes out of scope or once you delete something, it's actually going to free the allocated memory on the GPU. And when you get to describing like C extensions and kind of the most manual way to do it, you'll see that that can actually save you a lot of hassle. These are other kind of classes it provides. So it's an in out and in out classes to describe your arrays or matrices. And these handle memory transfer between the CPU and GPU. Basically, there's a lot of steps you'd have to do in order to perform. Let's say you have a NumPy array on your CPU, you want to like double all the elements. These are all the steps you'd have to do to be able to accomplish that. And there's a lot of them in terms of creating memory moving data across. And so PyCuda also has certain higher level abstractions where basically in means this array is meant to go to the GPU and it handles that for you. And in out is even a little bit more complicated. We're just saying this NumPy array, say, is meant to go into the GPU, be processed in your CUDA kernel, and then come back out. And as long as you're okay with that happening automatically, PyCuda can handle that behind the scenes. And the last thing, which I think is really useful is automatic error checking. So because CUDA is some of the operations execute asynchronously, and so collecting and surfacing the errors can be really challenging. And including this, this is from the documentation. If an asynchronous error occurs, it will be reported by some subsequent unrelated runtime function call. And that sounds pretty confusing to me. It's like, okay, well if an error happens in one thing, basically the next function you call is going to error. And so PyCuda also handles that for you and raises them as kind of specific Python exceptions in the paradigm you might be more familiar with. And finally, another interesting bit is you can do metaprogramming. So basically, when I was talking about threads, blocks, grids, basically you have to tune those parameters, like how many threads in a block, how many blocks in a grid. Just like you might do with parallel programming on a CPU. And it's often done with heuristics, but PyCuda basically says, forget heuristics, we can do this by running things, and we can empirically determine how to actually set these parameters. So this is one example, which is actually using JINJA templating. So like I said, because the module is a string in Python, it kind of like follows that any way you can create a Python string, you can pass and compile it. So this is kind of a clever, kind of crazy way of doing it, but you can basically pass in different parameters in terms of types. So you can see it's parameterizing over the float type. It's, you can pass in a different block size, a different thread block size. And it basically, so first templates your string, and then kind of Justin Tom compiles it into a PyCuda kernel. So I mean, that's really cool, because, you know, especially as you're trying to play around with this, and like, you know, this week I was trying to compile different things and see how they ran, but this step would be would be a lot faster, just be able to basically loop through different configurations in Python, and be able to see the results empirically. Okay, so then the last bit, which like I said, is the most manual, but it might give you the most flexibility is Cuda as a C extension. And so first, let's talk about Python C extensions. So Python, because the, you know, the interpreter is C based, you can extend it with C and C++ programs, you can add new modules of your own design. And that's used in even a lot of programs that want to achieve a better performance on the CPU. So for example, NumPy links into certain CPU system, or yeah, C system calls rather, to be able to achieve the kind of performance it does. So this is already a paradigm being used in kind of high performance computing settings. And so the question is, okay, so I know I can get my C or C++ program into Python as an extension. So then how do I get my Cuda program to a C or C++? And basically Cuda, well, there's different forms of it, but what I've been talking about is referred to as Cuda C. And so this is basically C, but with a special syntax. And so Nvidia provides you with this NVCC compiler, which basically takes your Cuda C source code and does a couple things. One, it turns the kernel into like assembly or binary for operations on the GPU. It takes one of these special syntaxes and replaces it with runtime calls. And then finally, you can also have it just compile the host like CPU code. And so NVCC can do all of it like itself. So there's just one compilation step that basically generates output in Cuda as well as the code you would need to run on the CPU to launch the kernel. And so on the Python side, it can get very complex. This is a very good GitHub repo. It sheets a little bit and uses Scython, but there's a couple options you can use when you're kind of going between C++ and Python. So Scython is one of them. Swig is another one that's also, there's an example in this repo. So basically once you find some way of creating your extension, then you need to use setup tools to compile it and link it together. And this code is also from that repository. Basically in setup tools, in your basically setup.py, you create an extension. You can specify the sources as well as how to compile it. And so you can see here that we're using the Cuda libraries. And you can see NVCC as well as GCC to basically compile all this together and package it up. And then that will basically link into our Python program. But I would encourage you to, this part gets very complex. If you're interested in this, I would encourage you to check out that code because those people put together some very complex tricks to actually be able to get all this to come together. So why would you want to do that? I just said like it's really complex. One is manual memory management, which you might see as a downside. You're like, we're using Python. Why do I want to manage my own memory? And this is kind of the constructor of that GPU adder class. You see mallocs. You're like, whoa. But, and here's a destructor.  But basically, why would you want this? But I think there is a benefit because there's certain manual memory management features in Cuda. So some advanced things, mapped memory I think is the most interesting, which is basically like you can map memory between your host, which is CPU again, and device and basically be able to access it without having to do an explicit data transfer. And so that can be pretty cool. But basically there's a couple of features that might only be accessible once you get down to the level of doing this kind of stuff. The other thing is, and I know this might be heresy because it's a Python conference, but you do get a compiler. And I would say the nice thing about that is like you're writing in a language that's unfamiliar to you, right? You know, at least for me, like I don't do a ton of Cuda programming, even when I use it, I'm mostly using Python. And so being able to have the compiler tell you this went wrong on these lines, I would say when I was working on tweaking this C extension stuff, I actually felt kind of grateful for the compiler. So that can be kind of nice. So to conclude, one, I want to talk a little bit about accessing a GPU. So you might be interested in playing around with some of this stuff yourself. One, Google Colab is like really awesome. It's a browser based notebook interface, and it's free and it gives you access to a GPU. And so some of the more custom stuff, I don't think you'll be able to like link extensions on it, but you can definitely download QPy and play around with that. And a PyCuda you should also be able to install. And so that's free.   They're pricing a little bit different. This is per GPU. I think you also need an instance to attach it to, but it still should be under a dollar an hour. If this stuff kind of interests you and you want to play around with it. So then the last question I want to talk about is where do you go next? So you kind of have gone through this talk. I've submitted you to this talk. And what can you do with it? So one, I would say you could start to think about how you can apply Quda and GPU programming to your workflow. Like I said, that's like a really active area of development. A lot of things coming out. And so especially if you have your work has anything to do with data pipelines, processing or obviously machine learning and deep learning, but that's already kind of already been done. So that's something to start thinking about. The other thing is, you know, now you have access to like 4,000 cores. What do you do with it? So you can start learning a little bit more about parallel programming algorithms, how to make use of that, like most effectively, because you can do cooler things with it than just like adding 10 million numbers to each other. And then the other thing is if this stuff kind of excites you, there's also a bunch of other kinds of devices to start thinking about. So people talk about the XPU concept. So Google has TPUs, which are specifically for deep learning.  And then you can kind of go a different direction to and start doing FPGA, which basically is building hardware to execute certain algorithms. So, you know, there's a whole device side of it too, and kind of getting beyond the CPU paradigm and figuring out, well, can I come up with a specialized device that's better than this kind of one single general smart thing? So that's what I would suggest if you found this to be interesting. Thank you so much. There's my Twitter. I'll probably post, I'll definitely post the slides and related code on there. So if you have any more questions, thank you so much.


So far we found how to develop equations 1 and 2. Now let's look how we get number 3 and number 4. For number 3 we start with again, the changing position is the area, all the blue area here, under the curve. But this time we split it up. We look at our area in one rectangular shape and one triangle B. So if you look at it, A over here, rectangular shape plus the triangle. So now the rectangular shape is pretty easy. It's V initial times delta T. If you look here, delta T times V initial. So that's easy to calculate. The other one is you have V initial down there and V final up here. This is exactly half of a square with delta T on one side and delta V, which is V initial to be final on the other side. If you look at it over here, delta V over here and the big square here. It's exactly half of it. For we have one half delta V delta T. You also know that acceleration is a slope. Therefore delta V over delta T is acceleration or delta V is the acceleration times delta T. We simply multiply both sides with delta T. Now if we combine those two here we get delta S is delta V initial. Sorry delta V initial times delta T. V initials times delta T plus one half times delta V, which is A delta T, times delta T, which gives one half A delta T square. Which is our third equation. Now if you look at our fourth equation, it looks kind of similar. Also it is. This time we're starting with the big red square. Which is the area right here. Which is nothing else than V final times delta T. So we find delta T and then we subtract the white triangle here. That white triangle, which is exactly the same area as the blue triangle. Namely one half times velocity, changing velocity times delta T. Which is what we already calculated, one half A delta T square. Therefore we get delta S is the big red square. V final times delta T minus one half A delta T square. You see the difference in number three. We took that small square down here A and we added B to find the complete area. In number four we start with the big red square or shape.