    def _build_compile_options(self):
        """Build compilation commands, including compilation flag library and includes.

        Returns
        -------
        List
            List of compilation options.

        Raises
        ------
        RuntimeError
            Unsupported GPU Arch.
        """

        ck_paths = self._get_ck_paths()
        options = [
            environ.get_compiler_opt_level(),
            "-fPIC",
            "-fvisibility=hidden",
            "-std=c++17",
            "-w",
            "-DCK_TIME_KERNEL=0",
            "-Xclang -mlink-builtin-bitcode -Xclang {}/amdgcn/bitcode/oclc_abi_version_400.bc".format(
                self._pkg_path()
            ),
        ]
        if self._arch in {"GFX908", "gfx908"}:
            options.append("-DCK_AMD_GPU_GFX908")
            options.append("--offload-arch=gfx908")
        elif self._arch in {"GFX90a", "gfx90a"}:
            options.append("-DCK_AMD_GPU_GFX90A")
            options.append("--offload-arch=gfx90a")
        else:
            raise RuntimeError("Unsupported GPU Arch")
        for path in ck_paths:
            options.append("-I" + path)
        options.append("-I" + os.path.join(self.static_files_path, "include"))
        rocrand_path = os.path.join(self._pkg_path(), "rocrand/lib/")
        options.append("-L" + rocrand_path)
        options.append("-lrocrand")
        if self._ndebug == 1:
            options.append("-DNDEBUG")
        return " ".join(options)
Build compilation commands, including compilation flag library and includes.

Returns
-------
List
List of compilation options.

Raises
------
RuntimeError
Unsupported GPU Arch.
python/aitemplate/backend/rocm/target_def.py