Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in expdist.py #192

Closed
isazi opened this issue Mar 30, 2023 · 2 comments
Closed

Error in expdist.py #192

isazi opened this issue Mar 30, 2023 · 2 comments
Assignees
Labels

Comments

@isazi
Copy link
Collaborator

isazi commented Mar 30, 2023

There is an error in comparing RuntimeFailedConfig with other values in the expdist.py example.

best performing configuration:
block_size_x=32, block_size_y=1, tile_size_x=8, tile_size_y=2, use_shared_mem=0, time=0.541ms
Traceback (most recent call last):
  File "/home/alessio/src/kernel_tuner/examples/cuda/expdist.py", line 65, in <module>
    tune_expdist()
  File "/home/alessio/src/kernel_tuner/examples/cuda/expdist.py", line 46, in tune_expdist
    best_config1 = min(kernel1[0], key=lambda x:x['time'])
TypeError: '>' not supported between instances of 'numpy.ndarray' and 'RuntimeFailedConfig'
@isazi isazi added the bug label Mar 30, 2023
@benvanwerkhoven benvanwerkhoven self-assigned this Jun 1, 2023
benvanwerkhoven added a commit that referenced this issue Jun 1, 2023
@benvanwerkhoven
Copy link
Collaborator

Thanks for letting me know! It's fixed now!

@LiuLiujie
Copy link
Contributor

A similar error also happens in the create_results(_) function in class integration. The results_filtered will also miss to filter out the RuntimeFailedConfig and cause the same comparison error in the below code.

An improvement can be:

#filter results to only those that contain the objective
results_filtered = [item for item in results if objective in item and isinstance(item[objective], float)]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants