Title: InternalError: Check failed: func->buffer_map.size() == 0 (3 vs. 0) : This pass must be called after MakePackedAPI · Issue #259 · microsoft/BitBLAS · GitHub
Open Graph Title: InternalError: Check failed: func->buffer_map.size() == 0 (3 vs. 0) : This pass must be called after MakePackedAPI · Issue #259 · microsoft/BitBLAS
X Title: InternalError: Check failed: func->buffer_map.size() == 0 (3 vs. 0) : This pass must be called after MakePackedAPI · Issue #259 · microsoft/BitBLAS
Description: When I used bitblas to tune a matmul operator on the A100, I encountered the following error. Environment Configuration: Ubuntu 22.04.2 LTS bitblas: 2bd1dee cuda12.1 The specific test script is as follows: from bitblas.gpu.matmul_analysi...
Open Graph Description: When I used bitblas to tune a matmul operator on the A100, I encountered the following error. Environment Configuration: Ubuntu 22.04.2 LTS bitblas: 2bd1dee cuda12.1 The specific test script is as ...
X Description: When I used bitblas to tune a matmul operator on the A100, I encountered the following error. Environment Configuration: Ubuntu 22.04.2 LTS bitblas: 2bd1dee cuda12.1 The specific test script is as ...
Opengraph URL: https://github.com/microsoft/BitBLAS/issues/259
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"InternalError: Check failed: func-\u003ebuffer_map.size() == 0 (3 vs. 0) : This pass must be called after MakePackedAPI","articleBody":"When I used bitblas to tune a matmul operator on the A100, I encountered the following error.\n\n\nEnvironment Configuration:\nUbuntu 22.04.2 LTS\nbitblas: 2bd1deeb7977ea27019c8acd3d926dec9ada9eed\ncuda12.1\n\nThe specific test script is as follows:\n```\nfrom bitblas.gpu.matmul_analysis import get_tensorized_func_and_tags\nfrom bitblas.base.roller.policy import TensorCorePolicy, DefaultPolicy\nfrom bitblas.base.arch import CUDA\nfrom bitblas.base.utils import apply_and_build\nimport tvm\nfrom tvm.script import tir as T\nimport bitblas\n\n@tvm.script.ir_module\nclass FusedSingleOp:\n @T.prim_func(private=True)\n def dense1(lv11: T.Buffer((T.int64(1024), T.int64(1024)), \"float16\"), B: T.Buffer((T.int64(1024), T.int64(1024)), \"float16\"), T_matmul_NT: T.Buffer((T.int64(1024), T.int64(1024)), \"float16\")):\n T.func_attr({\"layout_free_buffers\": [1], \"op_attrs\": {\"op_name\": \"nn.dense\", \"out_dtype\": \"float16\", \"units\": None}, \"op_pattern\": 4, \"tir.noalias\": T.bool(True)})\n # with T.block(\"root\"):\n for i0, i1, k in T.grid(T.int64(1024), T.int64(1024), T.int64(1024)):\n with T.block(\"T_matmul_NT\"):\n v_i0, v_i1, v_k = T.axis.remap(\"SSR\", [i0, i1, k])\n T.reads(lv11[v_i0, v_k], B[v_i1, v_k])\n T.writes(T_matmul_NT[v_i0, v_i1])\n with T.init():\n T_matmul_NT[v_i0, v_i1] = T.float16(0)\n T_matmul_NT[v_i0, v_i1] = T_matmul_NT[v_i0, v_i1] + lv11[v_i0, v_k] * B[v_i1, v_k]\n\nir_module = FusedSingleOp\nfunc = ir_module[\"dense1\"]\ntarget = tvm.target.Target(\"cuda\")\narch = CUDA(target)\npolicy = DefaultPolicy(func=func, arch=arch)\ntry:\n tensorized_func, tags = get_tensorized_func_and_tags(func, arch.target)\nexcept Exception:\n tags = None\n# Tune with Tensor Core if possible\nif tags:\n policy = TensorCorePolicy(func=tensorized_func, arch=arch, tags=tags)\n\nconfigs = policy.emit_config(topk=20)\n\ncpresults, best = apply_and_build(func, configs, arch, parallel_build=False)\n\nprint(best.code)\n```\n\n\nWhen I tested the same script on the V100 with same Environment Configuration, the error`InternalError: Check failed: func-\u003ebuffer_map.size() == 0 (3 vs. 0) : This pass must be called after MakePackedAPI`did not occur. Instead, it resulted in:\n\n\nThe specific test script is as follows:\n```\nfrom bitblas.gpu.matmul_analysis import get_tensorized_func_and_tags\nfrom bitblas.base.roller.policy import TensorCorePolicy, DefaultPolicy\nfrom bitblas.base.arch import CUDA\nfrom bitblas.base.utils import apply_and_build\nimport tvm\nfrom tvm.script import tir as T\nimport bitblas\n\n@tvm.script.ir_module\nclass FusedSingleOp:\n @T.prim_func(private=True)\n def dense1(lv11: T.Buffer((T.int64(1024), T.int64(1024)), \"float16\"), B: T.Buffer((T.int64(1024), T.int64(1024)), \"float16\"), T_matmul_NT: T.Buffer((T.int64(1024), T.int64(1024)), \"float16\")):\n T.func_attr({\"layout_free_buffers\": [1], \"op_attrs\": {\"op_name\": \"nn.dense\", \"out_dtype\": \"float16\", \"units\": None}, \"op_pattern\": 4, \"tir.noalias\": T.bool(True)})\n # with T.block(\"root\"):\n for i0, i1, k in T.grid(T.int64(1024), T.int64(1024), T.int64(1024)):\n with T.block(\"T_matmul_NT\"):\n v_i0, v_i1, v_k = T.axis.remap(\"SSR\", [i0, i1, k])\n T.reads(lv11[v_i0, v_k], B[v_i1, v_k])\n T.writes(T_matmul_NT[v_i0, v_i1])\n with T.init():\n T_matmul_NT[v_i0, v_i1] = T.float16(0)\n T_matmul_NT[v_i0, v_i1] = T_matmul_NT[v_i0, v_i1] + lv11[v_i0, v_k] * B[v_i1, v_k]\n\nir_module = FusedSingleOp\nfunc = ir_module[\"dense1\"]\ntarget = tvm.target.Target(\"cuda\")\narch = CUDA(target)\npolicy = DefaultPolicy(func=func, arch=arch)\ntry:\n tensorized_func, tags = get_tensorized_func_and_tags(func, arch.target)\nexcept Exception:\n tags = None\n# Tune with Tensor Core if possible\nif tags:\n policy = TensorCorePolicy(func=tensorized_func, arch=arch, tags=tags)\n\nconfigs = policy.emit_config(topk=20)\n\ncpresults, best = apply_and_build(func, configs, arch, parallel_build=False)\n\nprint(best.code)\n```","author":{"url":"https://github.com/Cunxiao2002","@type":"Person","name":"Cunxiao2002"},"datePublished":"2024-12-08T13:36:14.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/259/BitBLAS/issues/259"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a874cc05-7b56-eb8a-7f41-af0d3a751253 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CCF8:3F81E9:26253B:34E05F:6A4C25A1 |
| html-safe-nonce | cc18cf237591eb8b2dfb7138c7bb886a0f155eb0514f90b999db08a1db0ef909 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQ0Y4OjNGODFFOToyNjI1M0I6MzRFMDVGOjZBNEMyNUExIiwidmlzaXRvcl9pZCI6IjgxMzQ3NjIwNzcyNDE0ODQ3MDUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c861712a8d1acb635a47ea96b7dd1ba7caea09946a32a5fbdd0e72887accd8c0 |
| hovercard-subject-tag | issue:2725245895 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/BitBLAS/259/issue_layout |
| twitter:image | https://opengraph.githubassets.com/65121d95c4b166ab12900e827270f38a88610bbf7fe2013a14f7c1df035b792d/microsoft/BitBLAS/issues/259 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/65121d95c4b166ab12900e827270f38a88610bbf7fe2013a14f7c1df035b792d/microsoft/BitBLAS/issues/259 |
| og:image:alt | When I used bitblas to tune a matmul operator on the A100, I encountered the following error. Environment Configuration: Ubuntu 22.04.2 LTS bitblas: 2bd1dee cuda12.1 The specific test script is as ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Cunxiao2002 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 1b6b16d04026f131a36d57e3b01d0f4d26a51800edf48bf5ed0256e0ac905511 |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/BitBLAS git https://github.com/microsoft/BitBLAS.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 762181983 |
| octolytics-dimension-repository_nwo | microsoft/BitBLAS |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 762181983 |
| octolytics-dimension-repository_network_root_nwo | microsoft/BitBLAS |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9ee13484b32cf23e15fde191da4c9aa47d41201c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width