Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions python/tvm/contrib/cc.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,11 @@ def _linux_compile(

def _windows_compile(output, objects, options, cwd=None, ccache_env=None):
cmd = ["clang"]
compiler = os.getenv("TVM_WIN_CC", default="clang")
win_target = os.getenv("TVM_WIN_TARGET", default="x86_64")
cmd = [compiler]
cmd += ["-O2"]
cmd += ["--target=" + win_target]

if output.endswith(".so") or output.endswith(".dll"):
cmd += ["-shared"]
Expand Down
14 changes: 11 additions & 3 deletions python/tvm/dlight/gpu/gemv.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,9 @@ def apply(
TS, TR = 8, 64
else:
TS, TR = 1, 64
elif target.kind.name == "opencl" and "android" in str(target.host):
elif target.kind.name == "opencl" and (
("android" in str(target.host)) or ("adreno" in str(target.attrs))
):
TAG_S, TAG_R = "threadIdx.x", "threadIdx.y"
VEC_C = 8
LOAD_V_SHARED = False
Expand Down Expand Up @@ -686,7 +688,10 @@ def apply(
DEC_PACK = 8
SCALE_PACK = 4

if target.kind.name == "opencl" and "android" in str(target.host):
if (
target.kind.name == "opencl"
and (("android" in str(target.host)) or ("adreno" in str(target.attrs)))
):
TAG_S, TAG_R = "threadIdx.x", "threadIdx.y"
VEC_C = 8
UNROLL = 8
Expand Down Expand Up @@ -756,7 +761,10 @@ def sch_outer_reduction_fallback( # pylint: disable=too-many-arguments, invalid
):
"""Schedule the outer reduction block."""
# NOTE: Only Android is supported so far
if not (target.kind.name == "opencl" and "android" in str(target.host)):
if not (
target.kind.name == "opencl"
and (("android" in str(target.host)) or ("adreno" in str(target.attrs)))
):
return None
batch, s, r, c = sch.get_loops(block)
len_s = get_extent(sch, s)
Expand Down