Auto scheduler Cannot find any valid schedule

Hi, I’m new to tvm and I tried the code auto_scheduler_matmul_x86.py but encountered the following error:

python .\auto_scheduler_matmul_x86.py
Computational DAG:
A = PLACEHOLDER [1024, 1024]
B = PLACEHOLDER [1024, 1024]
matmul(i, j) += (A[i, k]*B[k, j])
C = PLACEHOLDER [1024, 1024]
out(i, j) = (matmul[i, j] + C[i, j])

----------------------------------------------------------------------
------------------------------  [ Search ]
----------------------------------------------------------------------
Generate Sketches               #s: 3
Sample Initial Population       #s: 2014        fail_ct: 1      Time elapsed: 0.42
GA Iter: 0      Max score: 0.9997       Min score: 0.9337       #Pop: 128       #M+: 0  #M-: 0
GA Iter: 4      Max score: 0.9999       Min score: 0.9880       #Pop: 128       #M+: 1381       #M-: 76
EvolutionarySearch              #s: 128 Time elapsed: 1.91
----------------------------------------------------------------------
------------------------------  [ Measure ]
----------------------------------------------------------------------
Get 10 programs to measure:
..........*E*E*E*E*E*E*E*E*E*E
==================================================
No: 1   GFLOPS: 0.00 / 0.00     results: MeasureResult(error_type:RuntimeDeviceError, error_msg:Traceback (most recent call last):
  File "C:\Users\Yanming\AppData\Roaming\Python\Python37\site-packages\tvm-0.8.dev1939+ge7a0c5cff-py3.7-win-amd64.egg\tvm\auto_scheduler\utils.py", line 295, in call_func_with_timeout
    res = worker.recv()
  File "C:\Us
...
ys.exc_info())
  File "C:\Users\Yanming\miniconda3\envs\tvm-build\lib\shutil.py", line 398, in _rmtree_unsafe
    os.unlink(fullname)
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\Yanming\\AppData\\Local\\Temp\\tmp9xc10k8j\\tmp_func.tar.so'
, all_cost:10.13, Tstamp:1652356199.19)
==================================================
Placeholder: A, B, C
parallel i.0@j.0@ (0,2048)
  for j.1 (0,2)
    for k.0 (0,1024)
      for i.2 (0,2)
        for i.3 (0,32)
          vectorize j.3 (0,4)
            matmul = ...
parallel i (0,1024)
  for j (0,1024)
    out = ...

==================================================
No: 2   GFLOPS: 0.00 / 0.00     results: MeasureResult(error_type:RuntimeDeviceError, error_msg:Traceback (most recent call last):
  File "C:\Users\Yanming\AppData\Roaming\Python\Python37\site-packages\tvm-0.8.dev1939+ge7a0c5cff-py3.7-win-amd64.egg\tvm\auto_scheduler\utils.py", line 295, in call_func_with_timeout
    res = worker.recv()
  File "C:\Us
...
ys.exc_info())
  File "C:\Users\Yanming\miniconda3\envs\tvm-build\lib\shutil.py", line 398, in _rmtree_unsafe
    os.unlink(fullname)
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\Yanming\\AppData\\Local\\Temp\\tmpg6iab8_c\\tmp_func.tar.so'
, all_cost:11.27, Tstamp:1652356201.05)
==================================================
Placeholder: A, B, C
matmul auto_unroll: 512
parallel i.0@j.0@i.1@j.1@ (0,8192)
  for k.0 (0,128)
    for i.2 (0,2)
      for j.2 (0,2)
        for k.1 (0,8)
          for i.3 (0,16)
            vectorize j.3 (0,2)
              matmul = ...
parallel i (0,1024)
  for j (0,1024)
    out = ...

==================================================
No: 3   GFLOPS: 0.00 / 0.00     results: MeasureResult(error_type:RuntimeDeviceError, error_msg:Traceback (most recent call last):
  File "C:\Users\Yanming\AppData\Roaming\Python\Python37\site-packages\tvm-0.8.dev1939+ge7a0c5cff-py3.7-win-amd64.egg\tvm\auto_scheduler\utils.py", line 295, in call_func_with_timeout
    res = worker.recv()
  File "C:\Us
...
ys.exc_info())
  File "C:\Users\Yanming\miniconda3\envs\tvm-build\lib\shutil.py", line 398, in _rmtree_unsafe
    os.unlink(fullname)
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\Yanming\\AppData\\Local\\Temp\\tmpo19f0qu6\\tmp_func.tar.so'
, all_cost:10.45, Tstamp:1652356202.53)
==================================================
Placeholder: A, B, C
parallel i.0@j.0@ (0,512)
  for i.1 (0,4)
    for j.1 (0,2)
      matmul auto_unroll: 16
      for k.0 (0,512)
        for j.2 (0,4)
          for k.1 (0,2)
            for i.3 (0,16)
              vectorize j.3 (0,4)
                matmul = ...
      for i.2 (0,16)
        vectorize j.2 (0,16)
          out = ...

==================================================
No: 4   GFLOPS: 0.00 / 0.00     results: MeasureResult(error_type:RuntimeDeviceError, error_msg:Traceback (most recent call last):
  File "C:\Users\Yanming\AppData\Roaming\Python\Python37\site-packages\tvm-0.8.dev1939+ge7a0c5cff-py3.7-win-amd64.egg\tvm\auto_scheduler\utils.py", line 295, in call_func_with_timeout
    res = worker.recv()
  File "C:\Us
...
ys.exc_info())
  File "C:\Users\Yanming\miniconda3\envs\tvm-build\lib\shutil.py", line 398, in _rmtree_unsafe
    os.unlink(fullname)
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\Yanming\\AppData\\Local\\Temp\\tmp7dcux7ue\\tmp_func.tar.so'
, all_cost:10.79, Tstamp:1652356204.02)
==================================================
Placeholder: A, B, C
parallel i.0@j.0@ (0,8192)
  for i.1 (0,4)
    matmul auto_unroll: 512
    for k.0 (0,64)
      for j.2 (0,32)
        for k.1 (0,16)
          matmul = ...
    for j.2 (0,32)
      out = ...

==================================================
No: 5   GFLOPS: 0.00 / 0.00     results: MeasureResult(error_type:RuntimeDeviceError, error_msg:Traceback (most recent call last):
  File "C:\Users\Yanming\AppData\Roaming\Python\Python37\site-packages\tvm-0.8.dev1939+ge7a0c5cff-py3.7-win-amd64.egg\tvm\auto_scheduler\utils.py", line 295, in call_func_with_timeout
    res = worker.recv()
  File "C:\Us
...
ys.exc_info())
  File "C:\Users\Yanming\miniconda3\envs\tvm-build\lib\shutil.py", line 398, in _rmtree_unsafe
    os.unlink(fullname)
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\Yanming\\AppData\\Local\\Temp\\tmpuel5cmwk\\tmp_func.tar.so'
, all_cost:10.47, Tstamp:1652356205.47)
==================================================
Placeholder: A, B, C
parallel i.0@j.0@ (0,4)
  matmul auto_unroll: 16
  for i.1 (0,64)
    for j.1 (0,2)
      for k.0 (0,128)
        for i.2 (0,2)
          for j.2 (0,32)
            for k.1 (0,8)
              for i.3 (0,8)
                vectorize j.3 (0,4)
                  matmul = ...
  for i.1 (0,1024)
    for j.1 (0,256)
      out = ...

==================================================
No: 6   GFLOPS: 0.00 / 0.00     results: MeasureResult(error_type:RuntimeDeviceError, error_msg:Traceback (most recent call last):
  File "C:\Users\Yanming\AppData\Roaming\Python\Python37\site-packages\tvm-0.8.dev1939+ge7a0c5cff-py3.7-win-amd64.egg\tvm\auto_scheduler\utils.py", line 295, in call_func_with_timeout
    res = worker.recv()
  File "C:\Us
...
ys.exc_info())
  File "C:\Users\Yanming\miniconda3\envs\tvm-build\lib\shutil.py", line 398, in _rmtree_unsafe
    os.unlink(fullname)
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\Yanming\\AppData\\Local\\Temp\\tmp0_yvndn8\\tmp_func.tar.so'
, all_cost:10.60, Tstamp:1652356206.89)
==================================================
Placeholder: A, B, C
matmul auto_unroll: 16
parallel i.0@j.0@i.1@ (0,512)
  for j.1 (0,4)
    for k.0 (0,64)
      for i.2 (0,2)
        for j.2 (0,8)
          for k.1 (0,16)
            for i.3 (0,16)
              vectorize j.3 (0,2)
                matmul = ...
parallel i (0,1024)
  for j (0,1024)
    out = ...

==================================================
No: 7   GFLOPS: 0.00 / 0.00     results: MeasureResult(error_type:RuntimeDeviceError, error_msg:Traceback (most recent call last):
  File "C:\Users\Yanming\AppData\Roaming\Python\Python37\site-packages\tvm-0.8.dev1939+ge7a0c5cff-py3.7-win-amd64.egg\tvm\auto_scheduler\utils.py", line 295, in call_func_with_timeout
    res = worker.recv()
  File "C:\Us
...
ys.exc_info())
  File "C:\Users\Yanming\miniconda3\envs\tvm-build\lib\shutil.py", line 398, in _rmtree_unsafe
    os.unlink(fullname)
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\Yanming\\AppData\\Local\\Temp\\tmp00dm9y25\\tmp_func.tar.so'
, all_cost:10.31, Tstamp:1652356208.37)
==================================================
Placeholder: A, B, C
parallel i.0@j.0@i.1@ (0,256)
  for k.0 (0,16)
    for j.2 (0,16)
      for k.1 (0,64)
        for i.3 (0,32)
          vectorize j.3 (0,8)
            matmul = ...
  for i.2 (0,32)
    for j.2 (0,128)
      out = ...

==================================================
No: 8   GFLOPS: 0.00 / 0.00     results: MeasureResult(error_type:RuntimeDeviceError, error_msg:Traceback (most recent call last):
  File "C:\Users\Yanming\AppData\Roaming\Python\Python37\site-packages\tvm-0.8.dev1939+ge7a0c5cff-py3.7-win-amd64.egg\tvm\auto_scheduler\utils.py", line 295, in call_func_with_timeout
    res = worker.recv()
  File "C:\Us
...
ys.exc_info())
  File "C:\Users\Yanming\miniconda3\envs\tvm-build\lib\shutil.py", line 398, in _rmtree_unsafe
    os.unlink(fullname)
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\Yanming\\AppData\\Local\\Temp\\tmp1dirle_i\\tmp_func.tar.so'
, all_cost:10.68, Tstamp:1652356209.82)
==================================================
Placeholder: A, B, C
matmul auto_unroll: 64
parallel i.0@j.0@i.1@ (0,2048)
  for j.1 (0,16)
    for k.0 (0,16)
      for j.2 (0,4)
        for k.1 (0,64)
          vectorize j.3 (0,8)
            matmul = ...
parallel i (0,1024)
  for j (0,1024)
    out = ...

==================================================
No: 9   GFLOPS: 0.00 / 0.00     results: MeasureResult(error_type:RuntimeDeviceError, error_msg:Traceback (most recent call last):
  File "C:\Users\Yanming\AppData\Roaming\Python\Python37\site-packages\tvm-0.8.dev1939+ge7a0c5cff-py3.7-win-amd64.egg\tvm\auto_scheduler\utils.py", line 295, in call_func_with_timeout
    res = worker.recv()
  File "C:\Us
...
ys.exc_info())
  File "C:\Users\Yanming\miniconda3\envs\tvm-build\lib\shutil.py", line 398, in _rmtree_unsafe
    os.unlink(fullname)
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\Yanming\\AppData\\Local\\Temp\\tmpma7dfwir\\tmp_func.tar.so'
, all_cost:10.18, Tstamp:1652356211.24)
==================================================
Placeholder: A, B, C
parallel i.0 (0,1024)
  for j.0 (0,2)
    for j.1 (0,32)
      for k.0 (0,1024)
        for j.2 (0,4)
          vectorize j.3 (0,4)
            matmul = ...
    for j.1 (0,512)
      out = ...

==================================================
No: 10  GFLOPS: 0.00 / 0.00     results: MeasureResult(error_type:RuntimeDeviceError, error_msg:Traceback (most recent call last):
  File "C:\Users\Yanming\AppData\Roaming\Python\Python37\site-packages\tvm-0.8.dev1939+ge7a0c5cff-py3.7-win-amd64.egg\tvm\auto_scheduler\utils.py", line 295, in call_func_with_timeout
    res = worker.recv()
  File "C:\Us
...
ys.exc_info())
  File "C:\Users\Yanming\miniconda3\envs\tvm-build\lib\shutil.py", line 398, in _rmtree_unsafe
    os.unlink(fullname)
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\Yanming\\AppData\\Local\\Temp\\tmps7ltffeb\\tmp_func.tar.so'
, all_cost:11.46, Tstamp:1652356216.03)
==================================================
Placeholder: A, B, C
parallel i.0@j.0@ (0,2)
  matmul auto_unroll: 64
  for i.1 (0,2)
    for j.1 (0,8)
      for k.0 (0,512)
        for i.2 (0,8)
          for j.2 (0,64)
            for k.1 (0,2)
              for i.3 (0,64)
                matmul = ...
  for i.1 (0,1024)
    vectorize j.1 (0,512)
      out = ...

Time elapsed for measurement: 20.99 s
----------------------------------------------------------------------
------------------------------  [ Done ]
----------------------------------------------------------------------
No valid state found in this search round. Check if it has traversed all of the search space.
Traceback (most recent call last):
  File ".\auto_scheduler_matmul_x86.py", line 135, in <module>
    sch, args = task.apply_best(log_file)
  File "C:\Users\Yanming\AppData\Roaming\Python\Python37\site-packages\tvm-0.8.dev1939+ge7a0c5cff-py3.7-win-amd64.egg\tvm\auto_scheduler\search_task.py", line 522, in apply_best
    "Cannot find any valid schedule for %s in file %s" % (self.workload_key, log_file)
RuntimeError: Cannot find any valid schedule for ["matmul_add", 1024, 1024, 1024, "float32"] in file matmul.json

I suppose it has to do with the os/permission? Any suggestion to fix it? I wrapped the code in a if if name == “main”: block. And I ran the command above with administrator privileges.