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:
@@ -27,8 +27,8 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import cutlass \n",
|
||||
"import cutlass.cute as cute "
|
||||
"import cutlass\n",
|
||||
"import cutlass.cute as cute"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -80,14 +80,13 @@
|
||||
"source": [
|
||||
"@cute.jit\n",
|
||||
"def hello_world():\n",
|
||||
"\n",
|
||||
" # Print hello world from host code\n",
|
||||
" cute.printf(\"hello world\")\n",
|
||||
"\n",
|
||||
" # Launch kernel\n",
|
||||
" kernel().launch(\n",
|
||||
" grid=(1, 1, 1), # Single thread block\n",
|
||||
" block=(32, 1, 1) # One warp (32 threads) per thread block\n",
|
||||
" grid=(1, 1, 1), # Single thread block\n",
|
||||
" block=(32, 1, 1), # One warp (32 threads) per thread block\n",
|
||||
" )"
|
||||
]
|
||||
},
|
||||
@@ -107,7 +106,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 4,
|
||||
"execution_count": 5,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
@@ -115,17 +114,19 @@
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"Running hello_world()...\n",
|
||||
"hello world\n",
|
||||
"Compiling...\n",
|
||||
"hello world\n",
|
||||
"Hello world\n",
|
||||
"Compiling with PTX/CUBIN dumped...\n",
|
||||
"Running compiled version...\n",
|
||||
"hello world\n"
|
||||
"hello world\n",
|
||||
"Hello world\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# Initialize CUDA context for launching a kernel with error checking\n",
|
||||
"# We make context initialization explicit to allow users to control the context creation \n",
|
||||
"# We make context initialization explicit to allow users to control the context creation\n",
|
||||
"# and avoid potential issues with multiple contexts\n",
|
||||
"cutlass.cuda.initialize_cuda_context()\n",
|
||||
"\n",
|
||||
@@ -137,6 +138,14 @@
|
||||
"print(\"Compiling...\")\n",
|
||||
"hello_world_compiled = cute.compile(hello_world)\n",
|
||||
"\n",
|
||||
"# Dump PTX/CUBIN files while compiling\n",
|
||||
"from cutlass.cute import KeepPTX, KeepCUBIN\n",
|
||||
"\n",
|
||||
"print(\"Compiling with PTX/CUBIN dumped...\")\n",
|
||||
"# Alternatively, compile with string based options like\n",
|
||||
"# cute.compile(hello_world, options=\"--keep-ptx --keep-cubin\") would also work.\n",
|
||||
"hello_world_compiled_ptx_on = cute.compile[KeepPTX, KeepCUBIN](hello_world)\n",
|
||||
"\n",
|
||||
"# Run the pre-compiled version\n",
|
||||
"print(\"Running compiled version...\")\n",
|
||||
"hello_world_compiled()"
|
||||
|
||||
Reference in New Issue
Block a user