diff --git a/python/tvm/contrib/cc.py b/python/tvm/contrib/cc.py index 59b57e08ba49..110f80db6186 100644 --- a/python/tvm/contrib/cc.py +++ b/python/tvm/contrib/cc.py @@ -372,8 +372,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"] diff --git a/python/tvm/dlight/gpu/gemv.py b/python/tvm/dlight/gpu/gemv.py index 2bcb8563a294..cff234140e50 100644 --- a/python/tvm/dlight/gpu/gemv.py +++ b/python/tvm/dlight/gpu/gemv.py @@ -11,7 +11,7 @@ # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the +# KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. """A rule for GEMV and DecodeGEMV.""" @@ -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 @@ -686,7 +688,9 @@ 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 @@ -756,7 +760,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)