Repository: mlcommons/inference
Issue: Can it run on AMD gpu?

Can it run on AMD gpu?

MLPerf reference implementation can run on ROCm and we have tried this for the bert model. If you have a GPU supporting ROCm, we can give you the instructions. 

I have a GPU supporting Rocm,could you give me the instructions?

Sure. Please try [this](https://docs.mlcommons.org/inference/benchmarks/language/bert/#__tabbed_13_1) This documentation site is WIP and so if anything is not working please report here. `docker` is not yet enabled for ROCm but this command should be working on most host platforms. 

I have a GPU supporting Rocm.I want try this for resnet50 model, is that ok?

Sure. Please try the command given [here](
https://docs.mlcommons.org/inference/benchmarks/image_classification/resnet50/#__tabbed_5_1) but without the `--docker` option. We are not able to test ROCm with docker currently as we don't have access to AMD GPUs. 

HI @arjunsuresh, when I use Ubuntu22.04 perform mlperf GPT-J training, there are some error codes on AMD GPU with ROCM as follows:

packages/mlc/main.py", line 96, in access     result = method(self, options)   File "/home/sit/mlc/lib/python3.10/site-packages/mlc/main.py", line 1511, in run     return self.call_script_module_function("run", run_args)   File "/home/sit/mlc/lib/python3.10/site-packages/mlc/main.py", line 1491, in call_script_module_function     result = automation_instance.run(run_args)  # Pass args to the run method   File "/root/MLC/repos/mlcommons@mlperf-automations/automation/script/module.py", line 225, in run     r = self._run(i)   File "/root/MLC/repos/mlcommons@mlperf-automations/automation/script/module.py", line 1842, in _run     r = self._call_run_deps(prehook_deps, self.local_env_keys, local_env_keys_from_meta, env, state, const, const_state, add_deps_recursive,   File "/root/MLC/repos/mlcommons@mlperf-automations/automation/script/module.py", line 3532, in _call_run_deps     r = script._run_deps(deps, local_env_keys, env, state, const, const_state, add_deps_recursive, recursion_spaces,   File "/root/MLC/repos/mlcommons@mlperf-automations/automation/script/module.py", line 3702, in _run_deps     r = self.action_object.access(ii)   File "/home/sit/mlc/lib/python3.10/site-packages/mlc/main.py", line 96, in access     result = method(self, options)   File "/home/sit/mlc/lib/python3.10/site-packages/mlc/main.py", line 1511, in run     return self.call_script_module_function("run", run_args)   File "/home/sit/mlc/lib/python3.10/site-packages/mlc/main.py", line 1491, in call_script_module_function     result = automation_instance.run(run_args)  # Pass args to the run method   File "/root/MLC/repos/mlcommons@mlperf-automations/automation/script/module.py", line 225, in run     r = self._run(i)   File "/root/MLC/repos/mlcommons@mlperf-automations/automation/script/module.py", line 1631, in _run     r = self._call_run_deps(deps, self.local_env_keys, local_env_keys_from_meta, env, state, const, const_state, add_deps_recursive,   File "/root/MLC/repos/mlcommons@mlperf-automations/automation/script/module.py", line 3532, in _call_run_deps     r = script._run_deps(deps, local_env_keys, env, state, const, const_state, add_deps_recursive, recursion_spaces,   File "/root/MLC/repos/mlcommons@mlperf-automations/automation/script/module.py", line 3702, in _run_deps     r = self.action_object.access(ii)   File "/home/sit/mlc/lib/python3.10/site-packages/mlc/main.py", line 96, in access     result = method(self, options)   File "/home/sit/mlc/lib/python3.10/site-packages/mlc/main.py", line 1511, in run     return self.call_script_module_function("run", run_args)   File "/home/sit/mlc/lib/python3.10/site-packages/mlc/main.py", line 1491, in call_script_module_function     result = automation_instance.run(run_args)  # Pass args to the run method   File "/root/MLC/repos/mlcommons@mlperf-automations/automation/script/module.py", line 225, in run     r = self._run(i)   File "/root/MLC/repos/mlcommons@mlperf-automations/automation/script/module.py", line 1842, in _run     r = self._call_run_deps(prehook_deps, self.local_env_keys, local_env_keys_from_meta, env, state, const, const_state, add_deps_recursive,   File "/root/MLC/repos/mlcommons@mlperf-automations/automation/script/module.py", line 3532, in _call_run_deps     r = script._run_deps(deps, local_env_keys, env, state, const, const_state, add_deps_recursive, recursion_spaces,   File "/root/MLC/repos/mlcommons@mlperf-automations/automation/script/module.py", line 3702, in _run_deps     r = self.action_object.access(ii)   File "/home/sit/mlc/lib/python3.10/site-packages/mlc/main.py", line 96, in access     result = method(self, options)   File "/home/sit/mlc/lib/python3.10/site-packages/mlc/main.py", line 1511, in run     return self.call_script_module_function("run", run_args)   File "/home/sit/mlc/lib/python3.10/site-packages/mlc/main.py", line 1491, in call_script_module_function     result = automation_instance.run(run_args)  # Pass args to the run method   File "/root/MLC/repos/mlcommons@mlperf-automations/automation/script/module.py", line 225, in run     r = self._run(i)   File "/root/MLC/repos/mlcommons@mlperf-automations/automation/script/module.py", line 1842, in _run     r = self._call_run_deps(prehook_deps, self.local_env_keys, local_env_keys_from_meta, env, state, const, const_state, add_deps_recursive,   File "/root/MLC/repos/mlcommons@mlperf-automations/automation/script/module.py", line 3532, in _call_run_deps     r = script._run_deps(deps, local_env_keys, env, state, const, const_state, add_deps_recursive, recursion_spaces,   File "/root/MLC/repos/mlcommons@mlperf-automations/automation/script/module.py", line 3702, in _run_deps     r = self.action_object.access(ii)   File "/home/sit/mlc/lib/python3.10/site-packages/mlc/main.py", line 96, in access     result = method(self, options)   File "/home/sit/mlc/lib/python3.10/site-packages/mlc/main.py", line 1511, in run     return self.call_script_module_function("run", run_args)   File "/home/sit/mlc/lib/python3.10/site-packages/mlc/main.py", line 1501, in call_script_module_function     raise ScriptExecutionError(f"Script {function_name} execution failed. Error : {error}") mlc.main.ScriptExecutionError: Script run execution failed. Error : MLC script failed (name = download-file, return code = 256)