v4.3 update. (#2709)
* v4.3 update. * Update the cute_dsl_api changelog's doc link * Update version to 4.3.0 * Update the example link * Update doc to encourage user to install DSL from requirements.txt --------- Co-authored-by: Larry Wu <larwu@nvidia.com>
This commit is contained in:
@@ -26,10 +26,11 @@
|
||||
"source": [
|
||||
"# import torch for CUDA graphs\n",
|
||||
"import torch\n",
|
||||
"import cutlass\n",
|
||||
"import cutlass.cute as cute\n",
|
||||
"\n",
|
||||
"# import CUstream type from the cuda driver bindings\n",
|
||||
"from cuda.bindings.driver import CUstream\n",
|
||||
"\n",
|
||||
"# import the current_stream function from torch\n",
|
||||
"from torch.cuda import current_stream"
|
||||
]
|
||||
@@ -61,13 +62,15 @@
|
||||
" \"\"\"\n",
|
||||
" cute.printf(\"Hello world\")\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"@cute.jit\n",
|
||||
"def hello_world(stream : CUstream):\n",
|
||||
"def hello_world(stream: CUstream):\n",
|
||||
" \"\"\"\n",
|
||||
" Host function that launches our (1,1,1), (1,1,1) grid in stream\n",
|
||||
" \"\"\"\n",
|
||||
" hello_world_kernel().launch(grid=[1, 1, 1], block=[1, 1, 1], stream=stream)\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"# Grab a stream from PyTorch, this will also initialize our context\n",
|
||||
"# so we can omit cutlass.cuda.initialize_cuda_context()\n",
|
||||
"stream = current_stream()\n",
|
||||
@@ -585,7 +588,7 @@
|
||||
"\n",
|
||||
"# Calculate the time spent when launching kernels in a stream\n",
|
||||
"# Results are in ms\n",
|
||||
"stream_time = start.elapsed_time(end) \n",
|
||||
"stream_time = start.elapsed_time(end)\n",
|
||||
"\n",
|
||||
"# Warmup our GPU again\n",
|
||||
"g.replay()\n",
|
||||
|
||||
Reference in New Issue
Block a user