Skip to content

Commit

Permalink
Revert "[halide-backend] Initial implementation of HalideKernel and H…
Browse files Browse the repository at this point in the history
…alideScheduling (pytorch#126417)"

This reverts commit 4f9399b.

Reverted pytorch#126417 on behalf of https://github.com/fbgheith due to breaking internal builds ([comment](pytorch#126417 (comment)))
  • Loading branch information
pytorchmergebot committed Jun 24, 2024
1 parent 063facf commit 1a54bb0
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 1,297 deletions.
23 changes: 4 additions & 19 deletions test/inductor/test_halide.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import torch
import torch._inductor.async_compile # noqa: F401 required to warm up AsyncCompile pools
from torch._inductor import config
from torch._inductor.codecache import HalideCodeCache
from torch._inductor.runtime.hints import HalideInputSpec, HalideMeta
from torch._inductor.test_case import run_tests, TestCase
Expand All @@ -22,36 +21,25 @@
HAS_HALIDE = False


try:
from . import test_torchinductor
except ImportError:
import test_torchinductor


make_halide = config.patch(
cpu_backend="halide",
fallback_random=True, # TODO(jansel): support random
)


@unittest.skipUnless(HAS_HALIDE, "requires halide")
class HalideTests(TestCase):
def test_codecache(self):
fn = HalideCodeCache.generate_halide(
HalideMeta(
argtypes=[
HalideInputSpec(ctype="float*", name="in_ptr0", shape=["1024L"]),
HalideInputSpec(ctype="float*", name="in_ptr1", shape=["1024L"]),
HalideInputSpec(ctype="float*", name="in_ptr0", numel="1024L"),
HalideInputSpec(ctype="float*", name="in_ptr1", numel="1024L"),
HalideInputSpec(
ctype="float*",
name="out_ptr0",
shape=["1024L"],
numel="1024L",
),
],
target="host",
scheduler="Mullapudi2016",
scheduler_flags={
"parallelism": parallel_num_threads(),
"last_level_cache_size": HalideCodeCache.cpu_cache_size(),
},
),
textwrap.dedent(
Expand Down Expand Up @@ -94,9 +82,6 @@ def generate(g):
self.assertEqual(c, a + b)


SweepInputsCpuHalideTest = make_halide(test_torchinductor.SweepInputsCpuTest)
CpuHalideTests = make_halide(test_torchinductor.CpuTests)

if __name__ == "__main__":
if HAS_CPU and not IS_MACOS and HAS_HALIDE:
run_tests(needs="filelock")
Loading

0 comments on commit 1a54bb0

Please sign in to comment.