[Config] Add configuration file#359
Merged
yaoyaoding merged 13 commits intohidet-org:mainfrom Sep 27, 2023
Merged
Conversation
yaoyaoding
reviewed
Sep 26, 2023
Member
yaoyaoding
left a comment
There was a problem hiding this comment.
Thanks Allan, it looks good to me overall.
Left some suggestions on the code organization.
python/hidet/option.py
Outdated
Comment on lines
+55
to
+68
| doc.add(tomlkit.comment(description)) | ||
| if choices is not None: | ||
| doc.add(tomlkit.comment(f' choices: {choices}')) | ||
| if isinstance(default_value, (bool, int, float, str)): | ||
| doc.add(name, default_value) | ||
| elif isinstance(default_value, Tuple): | ||
| # represent tuples are toml arrays, do not allow python lists are default values to avoid ambiguity | ||
| val = list(default_value) | ||
| arr = tomlkit.array() | ||
| arr.extend(val) | ||
| doc.add(name, arr) | ||
| else: | ||
| raise ValueError(f'Invalid type of default value for option {name}: {type(default_value)}') | ||
| doc.add(tomlkit.nl()) |
Member
There was a problem hiding this comment.
Consider moving this logic into a standalone function like _create_toml_doc().
added 2 commits
September 26, 2023 14:33
Contributor
Author
|
Now it looks like this with the table feature: # The (warmup, number, repeat) parameters for benchmarking. The benchmarking will run warmup + number * repeat times.
bench_config = [3, 10, 3]
# The search space level.
# choices: [0, 1, 2]
search_space = 0
# Whether to enable operator cache on disk.
# choices: [True, False]
cache_operator = true
# The directory to store the cache.
cache_dir = "/home/allan/Programs/hidet_repo/hidet/.hidet_cache"
# Whether to build operators in parallel.
# choices: [True, False]
parallel_build = true
# The pair (max_parallel_jobs, mem_gb_per_job) that describe the maximum number of parallel jobs and memory reserved for each job
parallel_tune = [-1, 1.5]
# Whether to save the IR when lower an IRModule to the operator cache.
# choices: [True, False]
save_lower_ir = false
# Whether to cache the generated kernels during tuning.
# choices: [True, False]
debug_cache_tuning = false
# Whether to show the variable id in the IR.
# choices: [True, False]
debug_show_var_id = false
# Whether to check shapes of compiled graph and tasks during execution.
# choices: [True, False]
runtime_check = true
# Whether to show the verbose flow graph.
# choices: [True, False]
debug_show_verbose_flow_graph = false
[compile_server]
# The address of the compile server. Can be an IP address or a domain name.
addr = "localhost"
# The port of the compile server.
port = 8329
# Whether to enable the compile server.
# choices: [True, False]
enabled = false
# The user name to access the compile server.
username = "admin"
# The password to access the compile server.
password = "admin_password"
# The URL of the repository that the remote server will use.
repo_url = "https://github.com/hidet-org/hidet"
# The version (e.g., branch, commit, or tag) that the remote server will use.
repo_version = "main"
[cuda]
# The CUDA architecture to compile the kernels for (e.g., "sm_70"). "auto" for auto-detect.
arch = "auto" |
Member
|
Thanks @Aalanli! |
vadiklyutiy
pushed a commit
that referenced
this pull request
Jul 22, 2024
vadiklyutiy
pushed a commit
that referenced
this pull request
Jul 23, 2024
vadiklyutiy
pushed a commit
that referenced
this pull request
Dec 26, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Auto generates the following config file at ~/.config/hidet/hidet.toml, which the user can then edit to customize the config.
Setting
hidet.option....in a script does not change this file.