v4.0 update. (#2371)
This commit is contained in:
@@ -83,11 +83,6 @@
|
||||
"\n",
|
||||
" # Print hello world from host code\n",
|
||||
" cute.printf(\"hello world\")\n",
|
||||
" \n",
|
||||
" # 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",
|
||||
" # and avoid potential issues with multiple contexts\n",
|
||||
" cutlass.cuda.initialize_cuda_context()\n",
|
||||
"\n",
|
||||
" # Launch kernel\n",
|
||||
" kernel().launch(\n",
|
||||
@@ -129,6 +124,11 @@
|
||||
}
|
||||
],
|
||||
"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",
|
||||
"# and avoid potential issues with multiple contexts\n",
|
||||
"cutlass.cuda.initialize_cuda_context()\n",
|
||||
"\n",
|
||||
"# Method 1: Just-In-Time (JIT) compilation - compiles and runs the code immediately\n",
|
||||
"print(\"Running hello_world()...\")\n",
|
||||
"hello_world()\n",
|
||||
@@ -136,6 +136,7 @@
|
||||
"# Method 2: Compile first (useful if you want to run the same code multiple times)\n",
|
||||
"print(\"Compiling...\")\n",
|
||||
"hello_world_compiled = cute.compile(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