The landscape of the upper Midwest has become one of the most productive agricultural regions of North America. Fields of corn and soybeans reach to the horizon in every direction. This land, though, has spawned another kind of product, completely unintended but no less profound. The runoff from these agricultural operations compromises the water quality, both locally and farther down the Mississippi drainage, all the way to the Gulf of Mexico. In fact, this region is a major contributor to the zone of hypoxia in the Gulf, where excess pollutants wipe out marine life. The area of concern is the region of Northwestern Iowa and Southwestern Minnesota. Today, the plow dominates a landscape where once the grass has stood well over a person's head and buffalo roamed freely. Very few wetlands and native prairies remain on the land to filter the water and slow the pulse of runoff. In addition, the mass conversion of the prairie wetlands ecosystem to intensive farming has threatened many species of migratory birds and butterflies. These species often nest here or use the area during their cross-hemisphere migration routes. Through adapted farming and conservation practices, there are increasing points of hope. New data suggests that the level of nitrates in the water has been declining in recent years. The key is to look at current practices with an eye toward historical conditions and practical conservation strategies. Around 12,000 years ago, when the first humans appeared in North America, the upper Midwest was mostly a glacial landscape. When the glaciers last receded, they left behind a fertile soil, glacial lakes and wetland depressions called prairie potholes. The effects of the last glacial event are still being felt on the land. We're in the prairie pothole region, which is mainly glacial till. Placed here are pretty much the topography, and everything you see is placed here pretty much by glacials coming over the land and then receding, especially the receding part, where they gouged the landscape and made deposits in different areas. This is an open landscape dominated by grasses and wetlands. Glaciers came through this area and dug out these depressions. The climate has provided the moisture necessary to maintain the vegetation, the grassland vegetation and the wetlands. Interacting with the climate and the physical factors, glaciers, glaciation are disturbances such as grazing and fire, which have maintained the upland system in a very early, successional stage. We're at kind of a major boundary in southwestern Minnesota. We're sitting on the moraine of the last glacier that came into this region, and a moraine is a linear ridge of hills. This one trends northwest-southeast. And to the east of this line is a landscape that is very young geologically. The drainages haven't been integrated yet. You have rolling hills, a lot of wetlands, lakes, sloughs. To the west of this ridge is a much, much older glacial landscape. The difference in age is 14,000 years to the east, 400,000 to 600,000 years to the west. So there has been a lot more time for the drainage system to develop west of here. This difference in age of the two landscapes on either side of this ridge has to be appreciated when you're talking about land management, because on the west side you have this well-integrated drainage system. Every single low spot on the land surface has been drained, has been reached by headward erosion of a stream of some size. And so the whole landscape is connected with this dendritic drainage way. On the east side of this line, nothing is connected yet. This landscape is poorly drained, and it will become drained in the long run. And so there is going to be the creation and erosion of streams. And that's a hard thing for people who are managing the land to appreciate. They want it to kind of, lakes to stay looking like the lakes they always have been. They're reluctant to see lakes fill in and become marshes and shallow water environments. But that is going to be the natural progression of this landscape. The biggest change we see now that the state is fighting and doesn't understand is the Minnesota River was deeply down cut during glaciation 10,000 years ago. All its tributary streams which reach into this area are still adjusting to that down cutting event. And so they had waterfalls initially created at their junction with the Minnesota. And those waterfalls or nick points are migrating upstream. And in some cases are only 5 to 10 miles from where they join the Minnesota River. So you have these deeply incised drainage ways that meet with kind of a sluggish looking upland stream. Well eventually that gradient, that step in the gradient is not going to persist for the long run. It's going to be evened out. And so there's a lot of erosion. There's a lot of gullying banks are caving into the river. There's high sediment load in the Minnesota and its tributaries. And a lot of that is natural. Farmers do contribute some of it when they ditch and tile, but the bulk of it is a natural event. And it's something that is still adjusting after 10,000 years. When the first Europeans viewed this area in the late 1600s, they found the land covered with a waving sea of tall grass prairie, roaming herds of bison, and migrating tribes of plains Indians. Those Native Americans left subtle, yet lasting marks upon the land. After the Civil War, agricultural production hit full stride here, and within 100 years came to almost completely dominate the landscape. Most of the wetlands were actually drained at about the turn of the century, maybe up to about 1920, the mid-20s or so. People had to realize that Iowa and much of the upper Midwest here, the prairie pothole region, people had a difficult time even living in this area because of water. They had trouble even getting around. In Iowa, we had probably about two and a half million acres of wetlands that disappeared because of drainage. So people historically didn't like wetlands. And a lot of people still don't like them today because they were a real problem with people making a living off the land when they had to farm it. And the people's attitudes I think have changed somewhat because they realize a lot more now the values and functions of wetlands. Today, producers and land managers here are starting to look for ways some of that original ecosystem might regain function. The focus is on a few small patches set within the agricultural landscape. One may still find a small remnant of prairie or wetland in original condition. These areas serve as models and seed sources for restoration work elsewhere. Generally down here, over 90% of the original wetlands have been drained and are now used for farmland. For the tall grass prairie, I've heard various percentages but generally it's well less than 1% of the original tall grass prairie still remains. And I've heard as low as, you know, a tenth of a percent. So depending on what area you're looking at, tall grass prairie is very rare. We do have some tall grass prairie behind me. We have some on some of our other waterfall production areas and we use that as the seed source in order to start planting those types of plants in our new areas. So this is a skipper and this is one of the species of insects that we use to talk about the quality or the health of a prairie. The skippers are incredibly specific because they lay their eggs on grasses and despite the fact that it's not very showy of a species, they really do tell us quite a bit about the quality of the prairie. This prairie is also a very valuable resource because when you look at Iowa and the changes in the landscape that have happened over the past couple of hundred years, Iowa used to be predominantly covered by wetlands and prairies and now we have less than 1% of the prairie covering the landscape that we had 200 years ago. So this is an incredibly valuable resource, this site because of the genetic diversity and the species diversity of plants as well as other organisms that live here like insects. One of the other important aspects of this prairie particularly is that it shows quite a diversity of micro-habitats. We have the uplands here, we also have lower wetland areas and there's a high diversity of topography and the different vegetation communities that are associated with that. So it's important when we think about landscapes and we think about areas to either restore or preserve, it's important to think about getting the whole complement of these different kinds of habitat types and in many cases there are plants that are tightly associated with, for example, the lowlands like the wetlands and there are many other species of animals, wildlife that are associated with each of these different micro-habitats. So this 160 acres on Cale or Prairie is especially important because it has this diversity of different habitat types. First of our farming operation is a corn-soybean operation so it has to be economically profitable. Our whole family is conservation minded so that part is pretty easy to work with the family on. But it has to be economically viable for our total operation before we can do them. My parents are older and of course participated in a lot of the drainage of the farm and when we stop a tile and that type of thing, it has to be something that works with the total picture of the farm. That's kind of how we look at it. Big picture wise, we're actually in the Des Moines River on that watershed. Just a few miles north of us, we go into the Blue Earth River system which goes north into the Mississippi and through the Minnesota River. So we're kind of on a tabletop there but even our small watershed, we're in the Des Moines River when I see what comes down it. One of the concerns that I've had is watching the scour erosion on this river and watching the channel change and in my lifetime, we've owned this particular farm for 34 years. There's been a terrific amount of tile upstream increase. It's about a 30 mile watershed and the velocity and the speed the water comes down to us now is greatly enhanced. So we're seeing more scour erosion on the banks and that's one of the things that I'd like to see kind of slowed down and by establishing the grasses on these bank edges is really working in the right direction. In this immediate part of the Great Plains, the northern tallgrass per ecoregion, I think that we are something like 97% privately owned. This landscape is 97% privately owned and something like 85% engaged in cultivated agriculture. So any sort of public policy that has intentions of improving water quality or bird nesting success I think has to include the land that is privately owned. One of the most ambitious programs at work here focuses on establishing conservation practices on private land. The Minnesota Conservation Reserve Enhancement Program, or CREP, seeks to place 100,000 acres of marginal cropland in a conservation easement. One of the most significant issues that we've been working on over the last several years is trying to clean up the Minnesota River. It's one of the most polluted rivers in the United States. It's primarily dominated agricultural landscape. It runs from the western edges of Minnesota, actually into South Dakota, all the way into the Minneapolis-St. Paul area where it joins the Mississippi River. It's one of the principal, it is the primary tributary to the Mississippi River, and it's sought to be the number one pollutant to the Mississippi River in the state of Minnesota. Of course, from Minnesota's agricultural landscape, the Minnesota River probably is made up of all or parts of 37 counties. It's roughly a watershed of 10.5 million acres of land in this particular river's watershed, and roughly 10 million acres of that land is under intense agricultural cropping. So it's an extremely intensified agricultural. It certainly includes probably the most significant cropping areas in the state of Minnesota are found in this. This particular watershed, certainly we can't turn the clock back to prior to European settlement. We know agriculture is critical to the state of Minnesota, is trying to find that balance between conservation and agriculture use, and we think CREP has been a great, great selling tool for the state of Minnesota, particularly in trying to achieve very significant benefits to the Minnesota River. Wetland restorations are the types of eligible croplands that we are trying to enroll in this program. And the reason for that, of course, these are the lands that, if we can get them out of crop production, we can get a conservation practice on those parcels and protect our future resources from, you know, reducing soil and water erosion, sedimentation, nutrient loading into the Minnesota River, and also be looking at improving and enhancing fish and wildlife habitat. You know, one of the reasons that we're here, of course, is trying to enhance our water resources as well as our fish and wildlife resources within Minnesota. And in order to do that, we have to look at trying to improve and enhance the watershed in the Minnesota River, which then subsequently will benefit the Mississippi River and on down the river down to the Gulf of Mexico and issues related to hypoxia as an example. At the mouth of the Mississippi in the Gulf of Mexico lies an area known as the Dead Zone, or the zone of hypoxia. Here, excess nutrient runoff and pollution from upriver have created an oxygen-deprived body of water. No marine life can exist here. Improving water quality in the upper Midwest can help alleviate the Dead Zone. Additional connections extend across the hemisphere. Minnesota and Iowa form critical links in a migratory chain for countless bird species. Some of the species nest here. Some use the area to reproduce. Others continue their journey through here to the Arctic and then back into South America. When you look at this landscape, I think one of the key things that are gained, not only by the producer, but by myself being a taxpayer and all the other taxpayers, is the fact that this system that you see impacts people further down the river. I always think of my parents that live on the Mississippi. That's where I grew up. If I had more knowledge of this at the time when I was growing up as a kid, I would understand better the landscape. But this thing has an impact on that Mississippi river. It has an impact further down when you get to the Gulf of Mexico. Removal of nutrients, maintaining the flash flood system. That sponge effect, the wildlife habitat benefit on the migratory species all just benefit to everybody in the community as well as further down the watershed community. For me, in my present position as a wildlife biologist for NRCS, all of this is connected from the headwaters, from the potholes, the management of uplands through the flood plain, riparian systems to the coastal marshes, all of this is connected. So these areas get used by a wide assortment of wildlife, some of which stay around for extended periods and rear their young, either on the wetlands or in adjacent areas. Others which only occupy these habitats very temporarily en route to breeding areas elsewhere. This time of year you see used by transient birds that may have bred up in the Arctic and such as shorebirds. You see the mud flats out here which provide them access, vegetation free access to feed on the invertebrates that are in the shallow water which would allow them to complete their migration down to the Gulf and eventually down to South America. When we bought it was all grassland. Since then we've put the basins on it that are here today gradually over a period of time. My wife Jean and I are very much interested in wetlands for a number of reasons. The wildlife of course comes with it. Once you put the water in the wetland you have the wildlife following and the natural vegetation that comes along. It is extremely advantageous to not only the immediate neighbors but the long range downstream neighbors are benefiting from this too because of the filtration effect of the vegetation and the mere existence of the wetland between here and downstream at some point. The Prairie Pothole region in the upper Midwest and Canada is the most productive area in North America for producing waterfall ducks and geese. The birds that are going to stay here locally for waterfall are primarily mallards, blue winged teal, shovelers, gadwalls. Many of the other waterfall that migrate through here, the buffalo head, a lot of the diving ducks, scop, canvas-backed redheads, they'll go farther north in Nest and some of those Prairie wetlands farther north. Iowa currently has some hot spots as far as nitrate contribution to that whole hypoxia problem and part of our solution to that problem is to be able to position our wetland restorations within a watershed or a large landscape and position them to the point where we get the maximum filtration value out of our wetlands. Wetlands placed in a watershed anywhere are good but if we can strategically place those wetlands in a position where they do the greatest benefit everybody comes out ahead. Up here in the Upper Midwest, one of the big issues that's come up over the last few years is the hypoxia issue and that's mainly having to do with nitrogen, extra nitrogen that's in the system of the Minnesota River and in the Mississippi. Of course, it dumps into the delta and anytime we can, with our buffers and with our filter strips up in the Upper Midwest, we definitely can have an impact on removal of some of that nitrogen before it becomes a problem in our streams. While I'm sitting in the tractor cab planting on ridges or cultivating or harvesting, I often think of myself as being just one farmer within a watershed or within a flyway or within the northern Tolgras Ferry Eco Region and I try to think of my role. I love, of course, as all farmers do to think of big yields. It's just great fun to get big yields and that is what really matters to my success. But I also get some sort of reward from feeling that the birds that are making their way from, in some cases, golden plover. They pass through usually while we're planting corn and I think that they've been in Argentina and I think that they're headed for the very, very northernmost parts of North America. And I think of their trip when I'm moving really slowly across the field in the tractor and I'm fascinated and I really want to do what I can to make their trip as easy as possible. I like the idea of giving the really delicate and fine-tuned attention to what I'm doing on this farm so that that golden plover finds what it needs on its way through. But then I also want to be part of a network of information and research so that I can learn whether or not what I'm doing is creating any sort of advantage to the entire flyway or the entire watershed. I would like to believe, I would like to know that this farm is not contributing to the zone of hypoxia in the Gulf of Mexico. Farming with the mind on the larger ecological issues leads to new practices on the land. Small changes in tillage methods and timing can have a great effect on the landscape's overall health. This farm wouldn't be recognizable from the road passing by as being different in any way to an untrained eye from other farms, but there are a number of changes and practices that I've implemented to try to create benefits for water quality and wildlife. I've manipulated and tweaked their cropping system a little bit to try to make room for bird nesting success, small mammals, and our greater diversity of flora and fauna to exist while at the same time hoping to achieve maximum yields, maximum economic yields. I'm really enjoying in my professional life trying to design a corn and soybean cropping system that facilitates bird nesting success. We can use these implements to get 170 bushel per acre corn yields while at the same time leaving a 45-day no re-entry interval in our cropping system to allow ground nesting birds to rear broods of young. In our ridgely cropping system, the practices of the past of broadcast applications of fertilizers and herbicides are almost a part of the past. We apply our fertilizers in a band, seven inches deep, and in a very stable form so that the fertilizer that we apply is used by the crops that we grow and doesn't end up as pollution in surface water flow leaving the farm. We apply our nitrogen fertilizer at the point in time when the corn needs it the most with this row crop cultivator. We just make a few little modifications to it and we band our fertilizer typically in late May and we do nitrogen soil testing before making our fertilizer recommendations so that we are pretty assured that we're not applying more than we need. That combined with leaving the fields untilled in the fall and hopefully including the understory crops, we're really hoping to keep all of our fertilizers right here on the farm. Since we've changed cropping systems and since the arrival of some new technologies that allow us to leave this large no re-entry interval in our cropping system and allow us to leave untouched residue corn and bean stocks through the winter where we're finding that upland sandpipers regularly nest in rear broods right in our crop fields and I find this really, really exciting and really rewarding. Other rewards come when agency managers link up concerned producers with appropriate government programs such as the wetland reserve program and the Minnesota crop. When land is set aside through these programs, the ecological function may be managed using some basic conservation strategies by restoring or preserving prairies and wetlands and by establishing riparian buffers or filter strips. One of the things that we're trying to think about when we look at these prairies is how, in a fragmented landscape, how can we reconnect the pieces? How can we make this a better landscape for the species that we're trying to preserve in the prairies? And one way of doing that could potentially be by adding reconstructed prairies. Another way of putting this landscape back together could be by creating buffer systems that would connect these prairies. The site that we're looking at here now is a glacial remnant. This is a prairie that had never been cropped. In this case, this landowner hadn't done anything to the land and so we're able to come in, do some burning on it. We broke the tile lines. The Nature Conservancy actually owns the feed title on this now and we have the permanent easement on it. And so we're in the process of restoring the ecosystem for this particular site. As far as connectivity goes of this site with other sites that we're talking about a larger area, we address it here in Iowa a couple of different ways. In specific programs like the Wetlands Reserve Program and those related easement programs, we add extra points in for sites that are in proximity. Either you get the most points if they're touching, an application is touching an established site like this or it's within a mile or two miles, those types of things. And we try to bring those groups of easements together because we can get a more valuable package for wildlife and for water quality and all those types of things. If there is a segment and it's all in one land, we would try to get a buffer strip between this site, for example, and another one that's maybe a quarter mile away. We would try to get that person in maybe in a CRP buffer strip and plant that down to native grasses and forbs and so it becomes this passageway, this buffer between this site and another site. Maybe there's another landowner that has a representative site too and try to connect them all together so it becomes a very connective ecosystem. Although it's segmented in smaller pieces than what it was naturally, these alleys are wide enough so that they're just not a carnivore trap so that their wildlife can actually reproduce in there and can actually pass through and safely. We would try to get those done and have a good connected wildlife area. The way we see wetlands at the planting phase and all the way through it is that they're just one of the opportunities that we can use to get conservation on the land. Early on when we do our preliminary planning for these projects, we ranked them for water quality, for restorability, for cost of restoration. In this case, this wetland is set in a position where it created a string of wetlands over 30 miles long where it fit into that chain and created a situation where you cannot drive more than two miles in this chain north and south in the potholes without coming upon another restored wetland or a prairie system. So we use that as the ranking. We emphasize that and we also emphasize the fact that we took approximately 80% of the drainage area in this particular area and filtered it through this wetland so it had some big water quality benefits. These conservation buffers that we have out here today, the riparian forest buffers, they're planted here in the river bottoms in the flood zone areas and we're hopefully creating a practice here that will be absorbing nutrients that are moving underground in the crop fields here whereas we pick up a lot of nitrates that are picked up off the cornfields and come through the underground streams. We're also creating a lot of wildlife habitat down here and these are very fast growing species and we're going to create some habitat for the wildlife. The forest buffered trees are going to be creating shade habitat over the stream for the fisheries here in the southwest Minnesota tallgrass prairie, particularly for instance in the northern pike which is considered to be a lake species in a lot of cases, in most cases in Minnesota but they are known to migrate up in these streams at certain times of the year. Anytime you can create your banks a little bit more stable but also create some shade over in pockets and pools to just create a little bit more fish habitat for those migratory species. We're located here with this riparian forest buffer situated at the bottom of a landscape that's kind of steep for years. It had been tilled some. It's protecting what used to be a feedlot up there that could have had runoff coming through. We're protecting that. You've got a corn crop that's being raised down here and of course in this part of the country it takes a lot of nutrients, particularly nitrogen to raise that crop of corn and with the intense rainstorms we get we can get some leaching down into the root zone so that's going to be moving towards the stream which is only a couple hundred feet away and so anytime we can absorb any of that nutrients through a crop like the crop of grass that's located in the buffer here it's going to be absorbing that out and taking that out of the system. Landowners and land managers in the upper Midwest are faced with challenges both social and economic. In addition, the byproducts of an otherwise successful farming operation are threatening the ecology of the entire basin. Through appropriate conservation and farming practices however some solutions are being applied to this complex problem. As NRCS employees we don't make the decisions for the landowner. Our responsibility is to provide to that landowner alternatives, resource alternatives for those acres and then if there's programs available whether it's USDA programs whether it's interior programs or local soil and water conservation district programs those types of things lay those programs out so that landowners can fit the right decisions with a program to help them implement those decisions but as far as us making decisions we don't we provide alternatives to the landowner landowners that make the decision. When you look at conservation planning on this site you may come out and see your eyes may focus on a basin per se but when you can look beyond the basin and into the perspective of what the system is requiring do we need a filter system to help keep sediment and nutrient load out of a water flow can we do that not only with one landowner but with several and when you look at a basin per se like this the question would be is on the other side of the fence what's on the other side of the hill and how does it connect with one another and can you as a conservation planner make that connection happen by providing information, assistance opportunities for landowners to get together and complete conservation practices that not only function on their land but also work within the entire system as we work with one landowner then that information can go to another landowner as we work in a neighborhood in a group setting and collectively then these good decisions result in resulting in multiple acres large blocks of acres being treated properly


Somebody just asked a question which I'll answer just because it ties in. They were asking, did Neville have both an A and a C male and did he use them to breed in various things? So what it sounds like is that Neville ended up with two guys, right? And the A and the C, right?  So for lack of a better way, he ended up with a couple boys. And the A, he lost in 1989, he did a huge seed increase and put all of his best indicas in there like the G13 and the NL5 and a bunch of different stuff. And then him and his workers forgot to keep a backup in the bedroom. So he bloomed every A male and they all died and he lost it.


So welcome back My name is Chris Edsel and this is reap the benefits of heterogeneous computing with sickle That's how you pronounce the the four-letter acronym there. It's very fortunate that JP in the last session gave us an introduction to the challenges of heterogeneous computing that is Writing programs that can run on both CPUs and GPUs So first off The what would be the who am I slide if I was doing a Unix talk So here's a sort of bow piece of sickle code On the far left is the the very first computer I ran which was a one socket one core BBC micro with a 8-bit instruction set that got me into computing the You may not Recognize because it's a bit zoomed in the next next one along the the red and black for the inverted L shape That's a the end of a cray T3E cabinet That was the first super computer. I was involved with and Programmed that this was a time when it wasn't entirely clear that MPI was gonna win So we we we were taught both MPI and PBM as the programming models for that machine That was a hundred and forty four cores the hundred and forty four sockets again single core deck alpha CPUs the third system along is A bog standard x86 cluster happens to be the one that the the university where I work the university Cambridge The cluster is unproziacally named CSD three the Cambridge system for data-driven discovery And that's typical of clusters you find nowadays that's got several sockets The the isolates have got 76 cores per node And we also have GPU servers in there. So we've got a bunch of servers before Nvidia a 100s With 80 gigs around so the big ones And that's that's how you get power efficient super computer is by using Very last thing is Before software engineering and We're That's that's who I am what I do But why would you care about Having a programming model that's portable Why why And Well you could a few years ago But the landscape has changed and so the compulsory slide and talk on on sickle I've got next but this is the European version of the same thing These are the the new upcoming or already installed Large super computers in Europe, and you'll see the Lumie on the left It's got AMD CPUs and the GPUs in that system are also AMD Whereas Leonardo has Intel CPUs But the GPUs in that system and video All fine if you're assist admin and you're just running that that one system But what if you're a user what if you're a research group and you are applying for Time on one of these large systems If you have a program that's written in the programming model that can only run on some systems You're cutting yourself out of the opportunity of using others And you might not know say it's a refined time next year You might not know what system you're going going to be running on so you would be wise to have have your software I'm meanable to running on on any of those architectures and The reason this had a lot of backing behind it was this was the same situation in the US The new exoskeleton machines their frontier, which is the 1.1 exoflop system on the top 500 Aurora, which is being installed and El Capitan and Perlmutter If you look at the architectures that they have we've got GPUs from from all three vendors and so How would you program one of those what what programming model would you choose? Ideally you choose a non proprietary one because that that might free you up to to use different sorts of hardware It'd be nice if it were standardized, so it wasn't a single Wasn't defined by a single implementation So the US National Labs have got some portability layers C++ Uncle Kokos and one called Roger Which are very good pieces of software and I wouldn't say they were they were bad programming models But one thing they don't have Is a standard organization behind them to say So that you could choose from different implementations of the standard same way that in I so see plus plus We've got a standards organization I so we define the standard C++ and then you can buy your C++ compiler from Microsoft or you can get your C++ Compiler from GNU or from LLVM or NVIDIA and so there are multiple choices of of implementation So with that in mind This is this is one option So sickle is as I said how you pronounce it It's standardized by the Kronos group and the bullet points here are actually off the Kronos groups Website about sickle. You may know the Kronos group from open CL and another number of other programming models that they've standardized sickle is You could say Open CL is a little bit C like you can program open CL and C++ But there's a sort of impedance mismatch between the abstractions and so sickle is Meant to be easier to program because we're closer to the application domain because it has abstractions which are Easy as a handle it hides some of the the implementation details You don't need to know about that if you were using open CL you would have to So it enables heterogeneous code for offload processes It does require a modern ish C++ Because it uses features like lambda functions To do the kernel offload And it provides API's and abstractions to help you use CPUs GPUs FPGAs Some people use the term XPU where lowercase X stands for any letter or any number of letters You might want to describe your your processing units with and we've sort of seen an explosion in the silicon space for AI accelerators and This may be a way of programming those I'll show you some diagrams next to the implementation so you can see this sort of thread to that this Used to go on the next two diagrams used to be on one page, but There are now so many implementation so many back ends that they've had to split it out So this is the the sickle landscape and so if you're an application developer you are here at the top With your sickle code and then you can choose in the case of this slide any of these three implementations and If the code is written to the standard and the implementation is standards conforming it will just work no guarantees there about the performance of How it works, but you know it will run and and will run correctly So one big player in the space is Intel and their compiler is called DPC plus plus Obviously, you know, they're motivated to make sure that they've got a path to Compile applications that will run on their GPUs. So if you have one of the new fancy into Intel data center GPUs, which Then then that's a way to program it You can also you see the arrow there that says any CPU the sickle standard mandates that You have a Default device always exists. So as a fallback You could run the single threaded on the core of a CPU or if you wanted to expose the parallelism your implementation could Could talk open MP and use is all called on the CPU So Tom's question in the last session about, you know, if he doesn't have the the right GPU for the AMD Compiler can you compile on a CPU to check that things just work? That's actually part of the the sickle standard. It's guaranteed to exist and it's a it's a Really good debugging technique. So I'll explain the middle bit and then I'll come back to the the additional lines on the On the Intel one. So there's a company out of Scotland called code play And they make a commercial implementation of sickle called a compute CPP Which targets and devices via open CL and the the intermediate language that they've specified Spear V But they what one of the things they also did is got involved with Intel and the contract for the large machines in the US Unwrote plugins to DPC plus plus so Intel CPUs DPC plus plus has a plug-in architecture and co-play wrote plugins that can target Nvidia GPUs and AMD GPUs and Given all the complexity of that it works surprisingly well. I was surprised I taught a workshop on on sickle about a month ago and we had a room full of Nvidia S tops and we just downloaded the Intel DPC plus plus and the co-play plug-in and Worked so we're up front the room demoing on the the GPU that's built into the laptop, which is an Intel embedded GPU and the the learners in the classroom. We're using the exact same source code and running on the Nvidia GPUs and getting the same answer Maybe if you're in the room you're not surprised about that. Yeah Look surprisingly well So the the the one in red is called Hipsicle So it's the the first two were proprietary so They are the Intel's one is free as in beer, but not free as in speech And the co-play one I think was also free to download but you could buy the point there is you could buy support from a compiler vendor From a choice of two compiler vendors so say you had an automotive system with some sickle code in it And you didn't want your your car to crash you wanted to you know ensure you could sue somebody if that happens You had two proprietary ones to choose from Unfortunately Intel have bought out co-play so they're still operating as two separate companies But it's now at your choice for proprietary sickle compilers is reduced down to one again Hipsicle comes from the University of Heidelberg and Follows a completely sort of different routes to the the other two compiler vendors It's called Hipsicle because it originally targeted a AMD GPUs with with hip But now it targets many many more back-ends many more bits of hardware and so the name didn't really fit anymore They decide to change it to open sickle Which is a better name unfortunately and If you look at the GitHub issue, it's not quite clear They've been a bit pagey about who is suing them, but somebody is suing them over the name open sickle So they're going to have to choose a new name. It's temporarily reverted back to being a Hipsicle and then So if we go if we look at that slide you start with your C++ source code You have an implementation and it targets a back-end and that pattern is is repeated for all these other implementations So if you have Huawei Starfoil if you have NEC Vector engines There's an implementation and let you target that One thing I think is quite interesting on this slide is the celerity one the one in green So that lets you target clusters with the sickle abstractions So you no longer says it's targeting MPI there. You don't write any MPI at all You just distribute the stuff as you would if it were just a normal single device connected to your host except in this case It's an entire cluster So you can go to the that URL there Sickle dot tech and you can see what the state of the art is currently and there are there are new back-ends and implementations being announced all the time What does it look like in source code So as I mentioned before this it's C++ only it's unlike open MP you heard about earlier You could which you can put inside C and Fortran and C++ Sickle is C++ only So you your hash includes the header file and all of the the objects and types are in this in a namespace and There are only a limited number of things you have to learn about so you have to learn about the device and a device selector and a sickle queue And this is what the kernel launch looks like so This is a C++ lambda function So the square brackets there sort of indicates the things outside of captured by reference You get a command group handler when this happens When you submit to this queue You transfer the data In and out with these buffers and excesses so outside of the kernel on the host you create a buffer and Then on the inside of the kernel which gets executed on the device You talk to that buffer via via an accessor and you can have sorry about the You can you can specify the direction of the the data transfer There and then the actual computing here is this is C++ A plus B is done here and that's done For each element in the iteration space In a manner that's determined by the implementation So it might be serially if you're just running on a single CPU or it might be walk by walk if you're running on a Nvidia GPU or it it depends on on what that on what back end you've got and so the end of this C++ lambda function here this this queue submit at the very end when the destructors call the data is moved back to the host And then it's available to be to be written out. So it's advised not to do lots of IO from the device And so that's that's that's the sort of hello world of Sickle, it's a few lines. It's about it's a handful of C++ objects and types that you need to deal with does get more complex than that But you can get started you can offload a kernel with with just that that knowledge That's great if you're writing writing your code from scratch But a lot of people will have code that's already written that they'll need to port and they'll be coming from Probably the Nvidia world. So I'll have code that's written in in CUDA I chose it one before I get on to that but you step back and say all of this on the screen here was just C++ syntax there was no triple chevrons for kernel launches There were no dot CU file during or anything like that the point of that it might seem like a minor point But the point of that is you can now use the whole Ecosystem of tools that understand C++ syntax and they will understand your sickle code So that's linter's static analysis tools Anything that understands C++ source code won't be tripped up by something that's not in the language because sickle is just C++ code So say you have something that's not just C++ code. It's in CUDA You can convert it or you can go a long way to converting it with a tool called sickle-o-matic It used to be so it's been it's has been open sourced It was a tool from Intel called DPCT the D plus plus DPC plus plus compatibility tool Sickle-o-matic is a much better name And that'll take your your CUDA source and give you back sickle source code It gets about 90 to 95 percent of the way there some simple kernels will will will go straight through with no problem sometimes there's no exact match for The CUDA API when that happens it puts a coin to the translated source code Which you can search for and basically says you've got to do some work here to Complete that last five or ten percent that takes a lot of the drudgery out of it and a lot of the error-prone repetitious stuff and so I would advocate sickle-o-matic if you're needing to court CUDA What do you lose by by having a programming model that runs across all All architectures Little bit unknown. It's not that you can't know This is what we knew about it in 2020. So some colleagues here from the University of Bristol produced this paper that was in ISC in that year and they were testing Sickle versus OpenCL across four different architectures and as you'll note that the the difference in performance between the different programming models varies according to the architecture and Not shown here will vary according to the implementation And also not shown will will vary over time. So people will fix things We'll improve the performance. And so we just had the International workshop on OpenCL and sickle-con in Cambridge last week and the chair of that conference said you do need to Recheck if you if you base your assumptions on on what was true two years ago. The space is moving so fast That's not the case now So as I said the sickle will guarantee you the correctness portability doesn't necessarily guarantee you performance portability But if that's something that concerns you you can you can look into it So who does use sickle at the moment It's a handful of Domains a handful of industries It's not super wide spread and I think Kenneth and the rest of the easy build crew would be able to Look through the the source of the easy build stuff and see who some sort of survey about what what is using it And what isn't yet probably It gets by the number of the volume of tickets coming in Many probably not yet One that is is Gromax So they put a lot of effort into making sure that Gromax works very well on sickle so that they can now target all three of the the GPUs with the same source code base If you want to learn more about it you missed out last week as I mentioned I walk on sickle-con was on there's a sickle both and a sickle workshop at ISC in Hamburg next month and There is a sickle both a sickle workshop and sickle training proposed for supercomputing in Denver in November And so since this is an easy build conference I thought I'd look into easy build and see what see what was there as a hiptical is Supported software according to the documentation so it's about two minor versions behind and I would probably hold off on renaming it to open sickle because you just gonna have to name it back to something else so I'd leave the name as it is if you're using the the Intel toolchain the the new compilers the one API compilers The default to none so you would set that to through If you wanted to use the the new compilers, which you would if you had sickle code So the classic Intel compilers I ICC except I thought etc More full-time clearly one understand C++ for the the C C plus the classic C++ compiler doesn't understand sickle You do need the newest Intel C compiler one for the race on LLVM to do that. So you would need to flip that setting I finished a bit early, but those were some of the people who produced the pictures and there and there Things this is the list of handy URLs. I've got so the first one is the chronos group Who standardize it? So if you want the definitive answer on what the current standard is, that's where to go they just released the The latest version 7 of sickle 2020 so a word on Naming it the first one was sickle one point two and then sickle one point two point one And then they decided to change the naming scheme and then it's down to sickle 2020. That's the latest standard They base it on the ISO C++ standard that it's based upon So once ISO C++ comes out with a C++ 23 You'd expect it via a sickle 23 23 23 coming soon after sickle.tech is Run by the co-play people, I believe and that aggregates a whole bunch of community news useful resources Including a link to the third one. I've got down there is the sickle academy. So that's a set of online Materials for learning how to write sickle Short plug for my sponsor the the Cambridge Open Zeta scale lab So if you want to know what we're about that's the link to find that and I left Twitter in November last year. So you can find me on mast on HPC Chris at scholar dot social and I will take questions Do we need a microphone? So the first question the two questions there the first one is Is sickle translated to to CUDA PTX if you're targeting an Nvidia device. Yes Exactly how it happens will be implementation dependent. So Hipsicle will do a completely different way to DPC plus plus But they're they're all using LLVM in in the background So you if you remember from JP's talk earlier where he was talking about the host code and the device code splitting out some separate streams and having separate compilers and assemblers and then getting munched back into a Fat binary at the end. That's the process that would be used and so You delay me from Co-play gave a really great talk Last year now on how to debug sickle stuff and there's a flag you can give the sickle compiler to get in there They have their versions to get it to dump the PTX So you can actually inspect it and see where things are going right or all going wrong the the second question of Where things might not go right if if you're using the sickle ematic to automatically translate to Puda First one we found so the group of us in the direct project took a look at sickle about a year ago see how it would work in some example codes that we're interested in and The the tool Used some Intel specific name spaces some Intel specific Implementations so it had a DPC T name space and a DPC T I can't remember what the kernel was whether that mathematical function was but the the solution there was to Rewrite your own version of that thing It's a year ago. I've forgotten. It's forgotten. Well the exact one was but there there are I mean most of the most of the basic level stuff works really well All of the data transfer stuff has direct one-to-one comparisons All of the kernel launching stuff directly translates I'll talk to you afterwards What I can't do is is the way zoom is not working for me today. I can't share you the second tab Which has got the diagnostics that the sickle ematic puts out where when it can't do something So it gives you a code and the next explanation and those list of explanations to show you some of things that that are not implemented Yes So what do I think we can do to better convince vendors to sport sickle So specifically the example given was Lumi Where we don't want to you want to support from a commercial vendor He don't want to have to rely on the University of Hylberg not nothing bad about the University of Hylberg acts all the guy who does writes that is Genius and machine. He's really good at support. But yes, he's just about one person I Guess you've you know the normal way you get any vendors to do anything You ask and you say well, you won't buy the next one unless they But they do it so through whatever your support channel is you would say I need to run the sickle version of Pro Max on Lumi And it's not compiling because you compile up Right so they So the question is the long lines of sickle is different to cocos and Raja Because although all three of them see flip and abstraction layers the C plus plus over different device programming Sickle needs a compiler implementation Whereas the others can be compiled with the the existing compiler And that's a message that an awful lot of people don't understand you don't get first off As to advice as to advice to how to get your your vendors to do what you want I Think maybe that's a discussion I'm gonna say it on the screen


Hello, welcome to SSUnitech. So, we will decide and today we are going to see top four SQL tricky interview questions and answers. So, here is the first question. So, what is the output of the below query? You can see the query which is the selected count of C1 and C1 is getting under this query.  So, in this inner query we will be returning x and after that we will be having y then we will be having null. So, like these three values we will be having from this inner query and after that you can see we are going to do the count of the C1. So, this is basically the C1 column. So, if we are going to do the count of these three then ideally it should be going to return as three but it will not return three. Why it is not returning? Because whenever you are going to use the aggregate function and if any null value will come under that then that null value will be ignored. Then what will be the output of this? That will be two. So, that is why interviewer has asked this question. Let me quickly go inside the SSMS and show you the output. So, here you can see we are having the same query. So, first let me try to execute this inner query. So, it should be going to return x y and null that we can see. So, if we are going to execute with the count then it's written two. Let me quickly jump to the next question. So, here is the second question that what is the output of the below query. So, in this case we can see we are having this first value and then we are doing union with all these because here we have the union all with these three. So, in these three it will be going to return x then it will return null and after that again it will return null. So, this will be for these three and then we can see A. So, A should be going to have over here. So, we are going to use union. So, that is why interviewer has asked the question whether this null will be going to return two times or not. So, null will be going to return two times because it will start execution at the first position from the top. So, first it will be executing like this union. So, it will return A x and after that it will be going to do the union all with the null. So, it will be going to have the null and next it will again have the null with the union all. So, again it will be going to have the null. So, it will be going to return like all these four rows here. So, this is the catch because we are using the union over here and interviewer wants to know whether it will be going to return three rows A x null or it will return four rows A x null two times. So, as I told you it will be going to return two times it will start executing from the top. Let me quickly jump to the SSMS and here let me quickly go into the second question and here let me try to execute. So, as we can see it is going to return A x null two times. Now jump to the next question. So, suppose there are one table those are having four columns like employee ID, employee name, department and designation. So, those are also having duplicate records on that table. So, we need to write a query and by writing that query we should be going to remove the duplicate and here without using any ranking function. So, we cannot use the row number or the rank function. So, without writing those ranking functions we have to write a query to remove the duplicate from the table. Let me quickly go inside the SSMS and we'll try to write the query. So, here let me try to create the table first. So, table is created successfully. Now let me try to insert the data into the table. So, as we can see data should be going to insert. So, as we can see data is inserted successfully. Now let me try to select and we'll see and verify the data. So, here we can see we are having total five rows, three rows for Suseel and two rows for Prabhu. But we can see these are the duplicate rows. So, ideally in the output we should be going to have only two rows one for the Suseel and second for the Prabhu. So, how we can get it? So, for that you can understand first let me try to use the group by. So, under the group by we can go with the employee name. Then we can go with the department. Then we can go with the designation. So, like these three columns are making it duplicate and similarly here inside the select we can go and try to use these three and next we can use the count. So, it will be going to return how many times it is duplicate. So, this is duplicating two times and this is duplicate three times. So, here if we can go and instead of using any aggregate function as count we can use the max or min of the employee ID. So, what it will be returning? It will be returning only a single record that is 5 and 3 because here as we can see 5 is the maximum for Prabhu and 3 is maximum for the Suseel. So, we don't want to remove these three rows. We want to remove except these two rows from here. So, simply instead of going anywhere we can directly use the delete from this table and then we can write where we can see employee ID. So, this employee ID not in we can remove everything from here and we can simply call this as EMP ID. So, what it will be returning? It will be returning two values 1 for 5 and second for 3. So, we don't want to remove these two records except these two we want to remove everything from the table. So, let me try to delete. So, as we can see three rows affected let me try to verify. So, data should be going to delete in the table and we can verify it by selecting. So, we can see we are having only non-lubricate records in the table. So, by using this approach you can achieve it. Let me jump to the last question. So, here we can see there are two tables as per below. First is the envelope and second is the document table. So, these two tables and we are inserting some records into the table. So, as envelope is having 1 1 2 2 and 3 3 and here document is having 1 5 2 6 and null 0. So, what will be the output of the below query? So, here we can see the output of the doc. So, let me try to create this table so that will be very easy to understand. So, jump to the last question here. Let me try to create the table and inserting the data into the table. So, data is inserted. Now, let me quickly go into the envelope and try to select and after that let me try to select the docs as well and try to execute this. So, here we can see it is having ID 1 2 3 and here ID number is 1 2 then we can see null. So, let me quickly go in the query and try to understand what that query is doing. So, we can go here. So, here is the query. So, what this query is doing? It is updating the doc table. So, it means the second table it is updating. Now, what it is updating? It is updating the doc text. So, this column it is updating. Now, so the condition is it is joining with the ID of the doc with the envelope. So, envelope is having ID 1 and 2. Here we have the ID 1 and 2 that we can verify. So, like these two records should be going to update but we are also having this exist condition. So, this exist condition is saying if your document value is equals to envelope ID. So, it means if this ID is a label inside the envelope table only then we want to update it. So, like this is the same kind of thing it is writing again. So, what it will be updating? It will be updating your pages sequence which we can see 5 and 6 only for the ID 1 and ID 2. For the null it will not be update anything. So, this is the output of this question. Let me try to execute this update. It was affected and if you can see then we can verify the ID 1 and 2 has been updated but null is not updated. So, thank you so much for watching this video. If you like this video please subscribe our channel to get many more videos. See you in the next video.


Hello and welcome to the session. In this session we discuss the following question which says identify the figure and name its faces, vertices and edges. Before proceeding with the solution let's recall the definition for faces, vertices and edges. First we have faces. Each flat part of a solid is called its face. Next is the definition for vertices. Each corner where three faces of solid meet is called its vertex and the plural of vertex. Then we have the definition for edges, the two faces of solid. The key idea to be used for this question. Now let's proceed with the solution. This is the given figure. The given figure is a triangular prism. It is made up of two parallel n faces each one of which is a triangle and three lateral faces each one of which is a rectangle. Now we shall name the faces, vertices and edges of this triangular prism. Now first let's name the faces. It has two triangular faces that is A, B, C and D, E, F are the two triangular faces of this triangular prism. Then it has three rectangular faces which are named as A, B, E, D. Then A, D, F, C, C, B, E, F. Next let's name the vertices of this triangular prism. It has in all six vertices which are A, B, C, D and F. Then we have the edges of the triangular prism. We know that edge is a line where two faces of a solid meet. So for this triangular prism we have nine edges which are A, B, B, C, C, A, D, E, F, D, A, D, B, E and C, F. So for this triangular prism we have named its faces, vertices and edges. This completes the session. Hope you have understood the solution for this question.