Error applying diffs - "No sufficiently similar match found at start: ..."

Which API Provider are you using?
Anthropic
Which Model are you using?
Claude 3.5 Sonnet
What happened?
Cline is in a workflow of its own creation, editing files in sequence one by one using diffs.
It seems to struggle with updating a file that was created after the extension (or the VSCode window itself) was initialized. Cline knows its there because it creates it, but it struggles to keep track of contextual information on it. (random theory)
The general error that happens is below:

I'll now update the Editor Integration section to show how we'll integrate the existing LargeFileProcessor with the viewport-based prioritization system.

Error
Unable to apply diff to file: c:\Users\Chewy\Documents\GitHub\ryanjoachim\Roo-Cline\proposed_CurrentState.md No sufficiently similar match found at start: 17 to end: 35 (26% similar, needs 90%)
I apologize for the error. Let me try to apply the changes with more precise line numbers by first reading the current content of the file.

After this it will sometimes go on to read the file again, which allows it to successfully apply the diff.
Other times it'll go into a bit of a feedback loop until it kicks its way out, like in the image here:

Steps to reproduce

Ask Cline to update various parts of an existing file, using separate diffs for each change.

Relevant API REQUEST output
No response
Additional context
No response

To add to this, I have seen Cline now intentially creating issues as it gets the line numbers wrong when editing.
For example, you will wind up with something like:
    public async cancelSubscription(         subscriptionId: string,                     public async cancelSubscription(         subscriptionId: string,         cancelAtPeriodEnd: boolean = false     ): Promise<Stripe.Subscription> {

@jeremy-returned @ryanjoachim can you try out 2.2.15 and let me know if you're still having issues? Thank you for the help tracking these down!

I spoke too soon:
Seems to be due to Cline not reading the file before writing to it.
            case 'POST':
                return await createInstallTypeHandler(event);
            case 'PUT':
                return await updateInstallTypeHandler(event);
            case 'DELETE':
                return await deleteInstallTypeHandler(event);
            case 'GET': {
                const { db, close } = await createDb();
                try {
                case 'PUT':
                    return await updateInstallTypeHandler(event);
                case 'DELETE':
                    return await deleteInstallTypeHandler(event);
                case 'GET':
                    const installTypeId = event.pathParameters?.id;

                    // Get specific install type if ID is provided

I spoke too soon:
Seems to be due to Cline not reading the file before writing to it.
            case 'POST':
                return await createInstallTypeHandler(event);
            case 'PUT':
                return await updateInstallTypeHandler(event);
            case 'DELETE':
                return await deleteInstallTypeHandler(event);
            case 'GET': {
                const { db, close } = await createDb();
                try {
                case 'PUT':
                    return await updateInstallTypeHandler(event);
                case 'DELETE':
                    return await deleteInstallTypeHandler(event);
                case 'GET':
                    const installTypeId = event.pathParameters?.id;

                    // Get specific install type if ID is provided

Ugh. That's on 2.2.15? The export would be amazingly helpful if you can share.

I spoke too soon:
Seems to be due to Cline not reading the file before writing to it.
            case 'POST':
                return await createInstallTypeHandler(event);
            case 'PUT':
                return await updateInstallTypeHandler(event);
            case 'DELETE':
                return await deleteInstallTypeHandler(event);
            case 'GET': {
                const { db, close } = await createDb();
                try {
                case 'PUT':
                    return await updateInstallTypeHandler(event);
                case 'DELETE':
                    return await deleteInstallTypeHandler(event);
                case 'GET':
                    const installTypeId = event.pathParameters?.id;

                    // Get specific install type if ID is provided

Ugh. That's on 2.2.15? The export would be amazingly helpful if you can share.

The behavior @jeremy-returned mentioned aligns with what we see in my screenshot, where every attempt to edit the file fails until Cline finally says "Maybe I should try reading the file again...". I wonder if my random theory - It seems to struggle with updating a file that was created **_after_** the extension (or the VSCode window itself) was initialized... - might actually have some relevance, but not necessarily in the way I was thinking.
It kind of feels more like a "short term memory loss" situation and reminded me of a known issue in Cline revolving around the file picker/add context feature, where any new files/directories added locally during an open VSCode session are not visible to the @ context file picker.
Cline is smart enough to check open files or manually check for referenced files, but the file picker remains unaware of file/directory changes until either the current folder is closed+reopened or you use a dev command like @command:workbench.action.reloadWindow. Maybe a completely separate thing, but it got me thinking -
To what extent (if at all) does Cline keep track of the state a previously read/modified file or directory, at least within each unique task? I'm getting the impression that unless a file is re-read by Cline prior to a new interaction with it, Cline isn't using the most recent structure/content to start with.
In the screenshot here you can see that:

Cline finally said "just reread the file already" and is then able to find the position where new content is supposed to go.
Cline prepares the next diff to use within the same file it just modified. It fails for the same reason.
Cline tries to search for "unique content" it expects to already be in the Known Limitations section, which fails.
Cline then seems to get confused and tries searching the directory itself for the expected ## header, ignoring file contents...which returns null/0 results.
Finally, Cline decides to "read the file again" and all is well.

I have the export for this conversation if anyone really wants it. It just has ~10k lines in it and didn't want someone to open thinking they were in for a quick read 😆.
I intentionally kept the conversation going to push overall token usage+fill up the webView+iFrame, and except to ask a single question (or set a task like creating a file) after each [attempt_completion] I let Cline handle itself without any instructions from me.

Interesting... this could be on to something. I believe that LLMs pay less attention to content in the middle of the conversation, so that could explain why they sometimes forget the current state of the files / line numbers / etc.
Maybe there's some way to force it to re-read the file and then try applying the diff again after a failure, either with the prompt or with the response of the tool rejection 🤔


Nested graphs navigation

Hi, played around with your library and found it very useful but I have a question about nested navigation. Suppose I have an app with this navigation design

Is there a way to navigate from (A-A) to (C-D)? When I tried to navigate from (A-A) to (C-D) with screen (B) as the RootNavGraph starting scren it throws an error about finding NavGraph. But If I set the RootNavGraph start to (DestinationsNavHost A) I can navigate from (A-A) to(C-D). Is this the intended behaviour? Thank you.
Example

Hi @mnhyim !
Just my initial thoughts:

Are you sure you need all these DestinationNavHost? Note that nested graphs != as multiple NavHosts! You can have nested graphs all within the same NavHost and that is generally recommended except if you have some very specific requirements;
This navigation logic is the same as with official compose navigation. My library is not interfering with anything here.
Each of these NavHosts is associated with its own NavController and each of these can only navigate to immediate child destinations (given that you have multiple NavHosts. With a single NavHost, then the NavController could navigate multiple levels deep because all graphs and destinations belong to it)
So for example:

NavController associated with "root" NavHost can only navigate (again: in your case) to destinations A, B, C and D (the ones which are in the first level of course of this graph ofc).
NavController associated with "C" NavHost can only navigate to its D, E and F destinations.

Do you have a "top level" / "root" NavGraph for each of these DestinationNavHosts? You need a NavGraph without any parent for each of these. You don't want to pass NavGraphs.root to root NavHost, and NavGraphs.C to C NavHost if NavGraphs.C is a nested graph of root. With multiple NavHosts, each NavGraphSpec passed in should not be nested in any other NavGraph. Each of these operate as totally independent things, hence why you need multiple NavControllers :)

Closing since it is stale for a while. @mnhyim let me know if I can help any further!


accelometer data

When I getting data from mpu6050, even if I hold the sensor on my hand and don't allow to move, I still see 1g acceleration on my raspberry. When I drop the sensor, I still see 1g acceleration. What should I do to make difference  between hold and drop the sensor?

Hi prfessor.
I have the same issue, and a temporary-fix. When I read the acceleration data, this provides me with the x and y gyro data. When I read the gyro data, it provides me with the acceleration data. Using the results of your example on the MPU6050, dropping my sensor shows a change in the gyro data (which should be the acceleration data). Tilting the MPU at an angle in the x-axis shows a change in the accel x-axis data (which should be the gyro data).
This was seen on 10 different MPU6050 that I bought, using I2C on Raspberry Pi 4 and Raspberry Pi 5. I am not sure if the MPU6050 has changed over the years, or if the library has information reversed. This seems to work reliably for me.
Dr. Eugene Dakin


update to 1.10.55

aws-sdk-cpp 1.10.55
Destination channel: defaults
Links
{ticket_number}
Upstream repository
dependency for arrow-cpp 14.0.1 -> pyarrow 14.0.1 which would address CVE

...

Linter check found the following problems:
ERROR conda.cli.main_run:execute(124): `conda run conda-lint /tmp/abs_b8ecf5f2pq/clone` failed. (See above for error)
The following problems have been found:
===== ERRORS =====

clone/recipe/meta.yaml:23: patch_unnecessary: patch should not be in build when source/patches is not set
clone/recipe/meta.yaml:47: cbc_dep_in_run_missing_from_host: Run dependencies listed in the cbc should also be present in the host section.
===== Final Report: =====
2 Errors and 0 Warnings were found


UserWarning: Using settings.DEBUG leads to a memory leak, never use this setting in production environments!

Hi,
This is probably a python noob question again but I get this warning:
UserWarning: Using settings.DEBUG leads to a memory leak, never use this setting in production environments!
I read the Django documentation on how to disable this so I have to set DEBUG="False" however I double checked and I use 'export DEBUG="False";' in the Upstart config which I would expect would also take Django out of debug. Is that not the case?

In Python "False" is truthy (it's a non-empty string). DEBUG=False in settings.py should work.
Just leave the DEBUG line out of your upstart config altogether (or put DEBUG=) and don't mess around with the settings.py value. That should work


Enable deleting the last non-generated term in common rules rewriter

Currently, the common rules rewriter will not delete a term if the query will not contain at least one non-generated term in the query after the deletion.
This behavior leads to the following issues:

The behavior is quite counterintuitive.
It is not possible to redefine a query by replacing its terms by a combination of boost and filter queries. This would be very powerful as filter queries allow the definition of raw queries, which allows access to the big universe of Solr/Elasticsearch search capabilities.

By deleting the last non-generated term, the rewriter should show the following behavior:

If the query still contains generated terms, the query will be processed in the existing way using these terms.
If the query does not contain any term anymore, but contains boost and/or filter queries, the query will be defined as a MatchAllQuery.
If the query neither contains terms nor boost or filter queries anymore, the query will be defined as NoMatchQuery returning 0 results.

Makes sense to me. It might be tricky to cover the second case:

If the query does not contain any term anymore, but contains boost and/or filter queries, the query will be defined as a MatchAllQuery.

Let's assume we are left with a query term1 and want to apply the following rule:
term1 =>
  DELETE: term1
  UP(100): term2

term2 might not have been added when we apply the DELETE. I think the simplest solution would be to sort the instructions (DELETE, UP, SYNONYM etc.) per input and to put DELETE at the end.

It is a bit more complicated. The current implementation considers not to remove dmqs, boolqs and the like. There might be additional rules basing on the same term that is supposed to be deleted, e. g.
`a b =>
DELETE: a
a =>
SYNONYM: c
`
From a user perspective I would expect query a b to become q(dmq(c), dmq(b)).
This is why I consider to refactor DeleteInstruction in a way that it only collects terms to be deleted, but does not delete terms directly. Collected terms are deleted after all instructions are applied. The model is furthermore enhanced by a delete traversal, traversing the tree and removing all clauses that are empty after a term has been deleted.

Thank you for your input. I see even more complications here. There might be additional rules basing on the same term that is supposed to be deleted, e. g.
a b =>
  DELETE: a

a =>
  SYNONYM: c

a =>
	UP(1.0): b

From a user perspective I would expect query a b to become q(dmq(c), dmq(b)). Currently, the query simply becomes q(dmq(b)). This is why I consider to refactor DeleteInstruction in a way that it only collects terms to be deleted, but does not delete terms directly. Collected terms are deleted after all instructions have been applied. The model is furthermore enhanced by a delete traversal, traversing the tree and removing all clauses that are empty after a term has been deleted.

Hmm, but the user could simply move the second rule to the top. So the current solution is even more flexible.

Fixed by PR #95


Many 5Ghz channels are missing from the Linksys EA3500

The EA3500 has only 4 5ghz channels available compared to the very stock OEM firmware . Many devices can't detect the lower frequencies which renders the device useless.
A Patch to correct this issue was accepted long ago but never merged specifically for the EA3500 (audi) which is affected by this since Nov of 2017 .
Please add this to the source for the Linksys EA3500 to have a working 5Ghz , and has been tested and the patch works.

@Dantekazuma this isn't a LuCI issue but OpenWrt issue; please send patch to openwrt-devel mailing list and/or file a bug report at https://bugs.openwrt.org (however I'm pretty sure similar bugs exist already so do a search first, please).


man-db <IP_ADDRESS>

Also, libpipeline 1.4.1

https://travis-ci.org/Linuxbrew/homebrew-extra/builds/202501464#L2605
/bin/mkdir: cannot create directory `/usr/lib/tmpfiles.d': Permission denied

Uh-huh. Not sure what gives...

Try configure --with-systemdtmpfilesdir=#{prefix}/lib/tmpfiles.d
Here's a comment in Makefile.am
# The default for systemdtmpfilesdir is intentionally not prefix-sensitive,

https://travis-ci.org/Linuxbrew/homebrew-extra/builds/203077266#L2607-L2608
chown: changing ownership of `/home/linuxbrew/.linuxbrew/Cellar/man-db/<IP_ADDRESS>/bin/man': Operation not permitted

chown: changing ownership of `/home/linuxbrew/.linuxbrew/Cellar/man-db/<IP_ADDRESS>/bin/mandb': Operation not permitted

This is fun :)

It was because the build system attempts to chown the man executable to man:man. Disabling setuid stops it from doing that.

From Circle:
* Incorrect file permissions (664): chmod 644 /home/linuxbrew/.linuxbrew/Library/Taps/linuxbrew/homebrew-extra/Formula/libpipeline.rb

I'll submit a separate PR to fix that.

Submitted as #7, but I've also cherry-picked it onto this branch to confirm it works.

There's something wrong with the Travis webhook, but the build itself succeeded.


Hotfix incorrect variables in file checks, set katharoseq_dir to None ...

… by default
These are to address issues I've just been wrangling with the lab ;)

Reviewed. Everything looks good. Will approve once it goes through CI.

Approved. Everything appears in order.


[AutoPR devtestlabs/resource-manager] typo: devtestlabs/resource-manager/Microsoft.DevTestLab/DTL

Created to sync https://github.com/Azure/azure-rest-api-specs/pull/4538

This PR has been merged into https://github.com/Azure/azure-sdk-for-js/pull/594


Add option for suspend before starting. Add support multiple riemann …

…hosts.

Hello, thanks for quick response. We have two riemann servers to improve the reliability of the monitoring system. I wanted to teach sumd to send messages to multiple riemann servers. I agree, that made it somewhat awkwardly. I would be very glad if you can help or are responsible for implementing such functionality. About the delay: sometimes sumd starts earlier than services, which it tests. Sorry for my English

Hi, a friendly reminder that there's a bit of unaddressed feedback on this PR.


Headless mode v2

Reference Issues or PRs
#4 and #6

What does this implement/fix?
Put a x in the boxes that apply

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds a feature)
[x] Breaking change (fix or feature that would cause existing features not to work as expected)
[ ] Documentation Update
[ ] Code style update (formatting, renaming)
[ ] Refactoring (no functional changes, no API changes)
[ ] Build related changes
[ ] Other (please describe):

Testing

[ ] Did you test the pull request locally?
[x] Did you add new tests?

Documentation

Access-centered content checklist
Text styling

[ ] The content is written with plain language (where relevant).
[ ] If there are headers, they use the proper header tags (with only one level-one header: H1 or # in markdown).
[ ] All links describe where they link to (for example, check the Nebari website).
[ ] This content adheres to the Nebari style guides.

Non-text content

[ ] All content is represented as text (for example, images need alt text, and videos need captions or descriptive transcripts).
[ ] If there are emojis, there are not more than three in a row.
[ ] Don't use flashing GIFs or videos.
[ ] If the content were to be read as plain text, it still makes sense, and no information is missing.

Any other comments?

Reopening to trigger the CI run after bot update

Let's close the file browser (IMO preferred as we don't want changes in file browser upstream to affect our CI) or mask the date column, as it will show different time since last modification on snapshots depending on runner speed:

Actual
Expected

I think:
await page.sidebar.close();

should do it.

Or maybe even better, let's not close it but take screenshot of only the relevant area (again to reduce maintenance cost as we would need to update and review snapshots if anything changes in UI upstream).

bot please update snapshots

@krassowski I'm not sure what the current CI release error is related to: fatal: couldn't find remote ref refs/pull/12/merge.
Could it be related to the closing/re-opening of the PR? Or is it something I need to fix?

Could it be related to the closing/re-opening of the PR?

Yes, it is, no need to worry about it. I mean I will have to worry about it at some point :melting_face:


FittedCloud Revised Storage Provider Docs

Add FittedCloud driver to the the storage provider document.

Codecov Report

Merging #441 into release/0.5.0 will decrease coverage by -0.06%.
The diff coverage is n/a.

@@                Coverage Diff                @@
##           release/0.5.0     #441      +/-   ##
=================================================
- Coverage          31.06%   31.01%   -0.06%
=================================================
  Files                 29       29
  Lines               1751     1751
=================================================
- Hits                 544      543       -1
- Misses              1149     1150       +1
  Partials              58       58

Impacted Files
Coverage Δ

api/types/types_localdevices.go
77.35% <ø> (-1.89%)
:x:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update af90486...567dfb8. Read the comment docs.


Use power shell to right a put method for SSRS API deployment for setting shareddataset

I want to Use power shell to right a put method for SSRS API deployment for setting shareddataset.
I tried the put method in postman and it works fine:
method: put
link: http://fscnbeea2023.fs86.vwf.vwfs-ad/Reports/api/v2.0/Reports(23a6af79-9de3-49cb-b66b-625d3ff3909b)/SharedDataSets
Authorization: Type: NTLM Authentication [Beta]
Headers: Content-Type: application/x-www-form-urlencoded
Body:
[
{
"Id": "935be257-5a65-4c0d-b372-d5a6a188daf6",
"Name": "P_Calculate_Date_Default_Key",
"Path": "/Shared_data_sets/P_Calculate_date_Default_key",
"Type": "DataSet"
}
]
Then I tried in powershell with get method and it works:
`$Cred = Get-Credential
$Url = "http://localhost/Reports/api/v2.0/DataSets"
$Body = @{
  Path ="/Shared_data_sets/P_Calculate_date_Default_key"
      output_mode = "csv"
earliest_time = "-2d@d"
latest_time = "-1d@d"

}
Invoke-RestMethod -Method 'GET' -Uri $url -Credential $Cred -Body $body -OutFile output.csv
`
Then I tried in powershell with put method and it suffers error:
`$Cred = Get-Credential
$Url = "http://localhost/Reports/api/v2.0/Reports(23a6af79-9de3-49cb-b66b-625d3ff3909b)/SharedDataSets"
$Body = @{
   Id = "935be257-5a65-4c0d-b372-d5a6a188daf6"
  Name = "P_Calculate_Date_Default_Key"
  Path = "/Shared_data_sets/P_Calculate_date_Default_key"
  Type = "DataSet"

}| ConvertTo-Json
Write-Output $Body
Invoke-RestMethod -Uri $Url -Credential $Cred  -Body $body -Method Put -ContentType "application/x-www-form-urlencoded"
$error[0]|format-list -force
`
Error is shown as below:
Invoke-RestMethod : The remote server returned an error: (400) Bad Request.
At line:16 char:1

Invoke-RestMethod -Uri $Url -Credential $Cred  -Body $body -Method Pu ...

  + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
  + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand

Exception             : System.Net.WebException: The remote server returned an error: (400) Bad Request.
at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(WebRequest request)
at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()
TargetObject          : System.Net.HttpWebRequest
CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
ErrorDetails          :
InvocationInfo        : System.Management.Automation.InvocationInfo
ScriptStackTrace      : at , : line 16
PipelineIterationInfo : {}
PSMessageDetails      :
Could you please kindly help me to check the error and help me to solve the problem?

@fumiao0525 You could use a sniffer to discover a difference in the requests.

@fumiao0525 You could use a sniffer to discover a difference in the requests.

Hi , could you please kindly provide a short example of this sniffer?  I have not used this before .

Microsoft Message Analyzer
Wireshark

Close as stale issue.

Close as stale issue.


[Bug] XLA fail to compile cudnn_fmha by CudnnFusedMHARewriter

Issue type
Bug
Have you reproduced the bug with TensorFlow Nightly?
No
Source
binary
TensorFlow version
tf 2.14
Custom code
No
OS platform and distribution
Linux Ubuntu 20.04
Mobile device
No response
Python version
3.10
Bazel version
No response
GCC/compiler version
No response
CUDA/cuDNN version
CUDA 12.3/cuDNN 8.9.6
GPU model and memory
A800 80GB
Current behavior?
set xla_gpu_enable_cudnn_fmha, try using XLA to jit a simple bmm1-bmm2 function by CudnnFusedMHARewriter.
Standalone code to reproduce the issue
import os

import tensorflow as tf
import numpy as np

batch_size = 16
seq_len_q = 16
num_heads = 256
head_dim = 64
mat_dtypes = tf.bfloat16

# @tf.function(jit_compile=True)
# def build_tf_xla_graph(queries, keys, values):
#   keras_attention_layer = tf.keras.layers.Attention(causal=True, use_scale=False, dtype=mat_dtypes)
#   flash_attention_output = keras_attention_layer(inputs=[queries, values, keys])
#   return flash_attention_output

@tf.function(jit_compile=True)
def build_tf_xla_graph(queries, keys, values):
  score = tf.matmul(queries, keys, transpose_b=True)
  flash_attention_output = tf.matmul(score, values)
  return flash_attention_output

seq_len_v = seq_len_q
queries = tf.random.normal(
    (batch_size, seq_len_q, num_heads, head_dim), dtype=mat_dtypes)
keys = tf.random.normal(
    (batch_size, seq_len_v, num_heads, head_dim), dtype=mat_dtypes)
values = tf.random.normal(
    (batch_size, seq_len_v, num_heads, head_dim), dtype=mat_dtypes)

ir = build_tf_xla_graph.experimental_get_compiler_ir(queries, keys, values)(stage='hoo')
print(ir)

output = build_tf_xla_graph(queries, keys, values)
print(output)

and run:
XLA_FLAGS="--xla_gpu_enable_cudnn_fmha" python test_xla_mha.py

Relevant log output
2023-12-19 16:03:11.235376: I tensorflow/compiler/xla/service/gpu/cudnn_fused_mha_rewriter.cc:645] Before CudnnFusedMHARewriter:
HloModule a_inference_build_tf_xla_graph_26__XlaMustCompile_true_config_proto_6001324581131673121_executor_type_11160318154034397263_.14, alias_passthrough_params=true, entry_computation_layout={(bf16[16,16,256,64]{3,2,1,0}, bf16[16,16,256,64]{3,2,1,0}, bf16[16,16,256,64]{3,2,1,0})->bf16[16,16,256,64]{3,2,1,0}}

ENTRY %a_inference_build_tf_xla_graph_26__XlaMustCompile_true_config_proto_6001324581131673121_executor_type_11160318154034397263_.14 (arg0.1: bf16[16,16,256,64], arg1.2: bf16[16,16,256,64], arg2.3: bf16[16,16,256,64]) -> bf16[16,16,256,64] {
  %arg0.1 = bf16[16,16,256,64]{3,2,1,0} parameter(0), parameter_replication={false}, metadata={op_name="XLA_Args"}
  %arg1.2 = bf16[16,16,256,64]{3,2,1,0} parameter(1), parameter_replication={false}, metadata={op_name="XLA_Args"}
  %dot.7 = bf16[16,16,256,256]{3,2,1,0} dot(bf16[16,16,256,64]{3,2,1,0} %arg0.1, bf16[16,16,256,64]{3,2,1,0} %arg1.2), lhs_batch_dims={0,1}, lhs_contracting_dims={3}, rhs_batch_dims={0,1}, rhs_contracting_dims={3}, metadata={op_type="BatchMatMulV2" op_name="MatMul" source_file="/usr/local/lib/python3.10/dist-packages/tensorflow/python/framework/ops.py" source_line=1161}
  %arg2.3 = bf16[16,16,256,64]{3,2,1,0} parameter(2), parameter_replication={false}, metadata={op_name="XLA_Args"}
  ROOT %dot.9 = bf16[16,16,256,64]{3,2,1,0} dot(bf16[16,16,256,256]{3,2,1,0} %dot.7, bf16[16,16,256,64]{3,2,1,0} %arg2.3), lhs_batch_dims={0,1}, lhs_contracting_dims={3}, rhs_batch_dims={0,1}, rhs_contracting_dims={2}, metadata={op_type="BatchMatMulV2" op_name="MatMul_1" source_file="/usr/local/lib/python3.10/dist-packages/tensorflow/python/framework/ops.py" source_line=1161}
}

2023-12-19 16:03:11.236008: I tensorflow/compiler/xla/service/gpu/cudnn_fused_mha_rewriter.cc:841] After CudnnFusedMHARewriter:
HloModule a_inference_build_tf_xla_graph_26__XlaMustCompile_true_config_proto_6001324581131673121_executor_type_11160318154034397263_.14, alias_passthrough_params=true, entry_computation_layout={(bf16[16,16,256,64]{3,2,1,0}, bf16[16,16,256,64]{3,2,1,0}, bf16[16,16,256,64]{3,2,1,0})->bf16[16,16,256,64]{3,2,1,0}}

ENTRY %a_inference_build_tf_xla_graph_26__XlaMustCompile_true_config_proto_6001324581131673121_executor_type_11160318154034397263_.14 (arg0.1: bf16[16,16,256,64], arg1.2: bf16[16,16,256,64], arg2.3: bf16[16,16,256,64]) -> bf16[16,16,256,64] {
  %arg0.1 = bf16[16,16,256,64]{3,2,1,0} parameter(0), parameter_replication={false}, metadata={op_name="XLA_Args"}
  %arg1.2 = bf16[16,16,256,64]{3,2,1,0} parameter(1), parameter_replication={false}, metadata={op_name="XLA_Args"}
  %arg2.3 = bf16[16,16,256,64]{3,2,1,0} parameter(2), parameter_replication={false}, metadata={op_name="XLA_Args"}
  %fmha-bmm-bmm = (bf16[16,16,256,64]{3,2,1,0}, u8[0]{0}) custom-call(bf16[16,16,256,64]{3,2,1,0} %arg0.1, bf16[16,16,256,64]{3,2,1,0} %arg1.2, bf16[16,16,256,64]{3,2,1,0} %arg2.3), custom_call_target="__cudnn$fhmaBmmBmm", metadata={op_type="BatchMatMulV2" op_name="MatMul" source_file="/usr/local/lib/python3.10/dist-packages/tensorflow/python/framework/ops.py" source_line=1161}, backend_config={"algorithm":{"algo_id":"0","math_type":"TENSOR_OP_MATH","tuning_knobs":{"17":"1","24":"0"},"is_cudnn_frontend":true,"workspace_size":"0"},"fmha_scale":1,"dropout_rate":0,"bmm1_dot_dimension_numbers":{"lhs_contracting_dimensions":["3"],"rhs_contracting_dimensions":["3"],"lhs_batch_dimensions":["0","1"],"rhs_batch_dimensions":["0","1"]},"bmm2_dot_dimension_numbers":{"lhs_contracting_dimensions":["3"],"rhs_contracting_dimensions":["2"],"lhs_batch_dimensions":["0","1"],"rhs_batch_dimensions":["0","1"]},"intermediate_tensor_shape":{"element_type":"BF16","dimensions":["16","16","256","256"],"tuple_shapes":[],"layout":{"dim_level_types":[],"dim_unique":[],"dim_ordered":[],"minor_to_major":["3","2","1","0"],"tiles":[],"element_size_in_bits":"0","memory_space":"0","index_primitive_type":"PRIMITIVE_TYPE_INVALID","pointer_primitive_type":"PRIMITIVE_TYPE_INVALID","dynamic_shape_metadata_prefix_bytes":"0"},"is_dynamic_dimension":[false,false,false,false]},"seed":"42"}
  ROOT %get-tuple-element = bf16[16,16,256,64]{3,2,1,0} get-tuple-element((bf16[16,16,256,64]{3,2,1,0}, u8[0]{0}) %fmha-bmm-bmm), index=0, metadata={op_type="BatchMatMulV2" op_name="MatMul_1" source_file="/usr/local/lib/python3.10/dist-packages/tensorflow/python/framework/ops.py" source_line=1161}
}

2023-12-19 16:03:11.256692: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at xla_ops.cc:624 : INTERNAL: Failed to compile XLA Runtime program: failed to run compilation pipeline:
xla.program:5:13: error: failed to legalize operation 'builtin.unrealized_conversion_cast' that was explicitly marked illegal
    %view = memref.view %arg0[%c0][] : memref<8388608xi8> to memref<16x16x256x64xbf16>
            ^
xla.program:5:13: note: see current operation: %70 = "builtin.unrealized_conversion_cast"(%69) : (!llvm.struct<(ptr, ptr, i64, array<4 x i64>, array<4 x i64>)>) -> memref<16x16x256x64xbf16>

Traceback (most recent call last):
  File "/code/hej/deepray/test_tf_vmodule.py", line 56, in <module>
    output = build_tf_xla_graph(queries, keys, values)
  File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler
    raise e.with_traceback(filtered_tb) from None
  File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/eager/execute.py", line 60, in quick_execute
    tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name,
tensorflow.python.framework.errors_impl.InternalError: Failed to compile XLA Runtime program: failed to run compilation pipeline:
xla.program:5:13: error: failed to legalize operation 'builtin.unrealized_conversion_cast' that was explicitly marked illegal
    %view = memref.view %arg0[%c0][] : memref<8388608xi8> to memref<16x16x256x64xbf16>
            ^
xla.program:5:13: note: see current operation: %70 = "builtin.unrealized_conversion_cast"(%69) : (!llvm.struct<(ptr, ptr, i64, array<4 x i64>, array<4 x i64>)>) -> memref<16x16x256x64xbf16>
 [Op:__inference_build_tf_xla_graph_26]

@SuryanarayanaY @AyanmoI @Tixxx topic move from #62661 to here.

@sachinprasadhs @akuegel @Cheshire Any progress?

If you don't have time for the moment, can you give me an idea to fix this bug? I'm really in a hurry. @akuegel

@MoFHeka apologies for the late response, I have been out of office. I will take a look at this issue.

I'm getting this error when running your repro:
ValueError: Invalid stage selected: 'hoo'. Valid values are: 'hlo', 'hlo_serialized', 'optimized_hlo', 'optimized_hlo_serialized', 'optimized_hlo_dot'
Is your TF a custom build?
Also to make it more efficient, it'd better if you could provide the compiled HLO graph directly. Can you run your repro with these xla flags?
XLA_FLAGS="--xla_gpu_enable_cudnn_fmha=true --xla_dump_hlo_as_text --xla_dump_to=OUTPUT_LOCATION --xla_dump_hlo_pass_re=.*"

@Tixxx
Here I ran:
TF_DUMP_GRAPH_PREFIX=generated_test/ TF_XLA_FLAGS="--tf_xla_clustering_debug --tf_xla_auto_jit=2" XLA_FLAGS="--xla_gpu_enable_cudnn_fmha --xla_dump_hlo_as_text --xla_dump_hlo_pass_re=.* --xla_dump_to=generated_test/" python test_xla_mha.py

Here is the zip file:
generated_test_hlo.zip
One more thing, may I ask how could I trigger MHA_Layout::QKV_INTERLEAVED type when using TF XLA with user interface python code? Here is the example showed in cud-frontend repo.
When I check tensor slice in HLO, it's a ordinary scheme like:
strideA[seqlen_dim_idx] = h * d;
strideA[hidden_dim_idx] = 1;
strideA[head_dim_idx]   = d;
strideA[batch_dim_idx]  = s_q * h * d;

Not a QKV 3X form.

@MoFHeka Hi, right now you can't trigger QKV_INTERLEAVED in XLA since MHA rewriter in XLA does not pattern match this case. This feature will be added in the future.

@MoFHeka Also this zip file seems invalid. Could you verify if it is valid?

One thing I noticed in your mlir is the fmha call is not lowered properly to a function call,
in your mlir:
"lmhlo_gpu.fMHA"(%view, %view_1, %view_3, %view_5, %view_6) {......} : (memref<2x4096x16x64xbf16>, memref<2x4096x16x64xbf16>, memref<2x4096x16x64xbf16>, memref<2x4096x16x64xbf16>, memref<0xui8>) -> () "fmha-bmm-bmm"
the lowered mlir should look something like:
call @xla.gpu.fused.attention.bmm.bmm
This would suggest that either the runtime lowering logic has a bug or your xla build doesn't have the runtime lowering code we merged a few months ago.
what's the HEAD of your xla build?

@MoFHeka Also this zip file seems invalid. Could you verify if it is valid?

zip file seems work well. I try to upload it again.
generated_test.zip

One thing I noticed in your mlir is the fmha call is not lowered properly to a function call, in your mlir: "lmhlo_gpu.fMHA"(%view, %view_1, %view_3, %view_5, %view_6) {......} : (memref<2x4096x16x64xbf16>, memref<2x4096x16x64xbf16>, memref<2x4096x16x64xbf16>, memref<2x4096x16x64xbf16>, memref<0xui8>) -> () "fmha-bmm-bmm"
the lowered mlir should look something like: call @xla.gpu.fused.attention.bmm.bmm
This would suggest that either the runtime lowering logic has a bug or your xla build doesn't have the runtime lowering code we merged a few months ago.
what's the HEAD of your xla build?

I use TF2.4 from image nvcr.io/nvidia/tensorflow:23.11-tf2-py3. When I update TF to latest stable 2.5, it seems all work well. Thank you!
But there is another question. Why is FMHA almost no faster than a regular XLA? Also which time we can use FMHA with dim 128 and so on?

It should be faster if you have softmax and training. Right now, XLA(cuDNN) has two fmha kernels implemented. The first one is fused attention and the second one is flash attention. Fused attention only support sequence length up to 512 and head dim 64 and it is not likely to support 128 in the future. Flash attention on the other hand, supports all any sequence length and head dim 128. Right now, XLA choose between these 2 kernels based on whether sequence length is larger than 512 or not.

@MoFHeka  have you tried with softmax and other intermediate nodes to get some perf improvement? if you dont see other errors during compilation, maybe we can close this issue?

@Tixxx The improvement is very small, even within 10%, I don't know if it is a measurement error.

Here is the test script, and run to test:
TF_XLA_FLAGS="--tf_xla_auto_jit=2 --tf_xla_cpu_global_jit" XLA_FLAGS="--xla_gpu_enable_cudnn_frontend --xla_gpu_enable_cudnn_fmha" python benchmark_flash_attn.py --benchmark_filter=TFXLAAttnBenchmark_t0

# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""Benchmark for FlashAttn and compute_grad of FlashAttn."""

from collections import defaultdict
import csv
from datetime import datetime
import itertools
import math
import numpy as np
import random
import os

from tensorflow.core.protobuf import config_pb2
from tensorflow.python.client import session as session_lib
from tensorflow.python.framework import config as framework_config
from tensorflow.python.framework import dtypes
from tensorflow.python.framework import ops
from tensorflow.python.ops import array_ops
from tensorflow.python.ops import control_flow_ops
from tensorflow.python.ops import gradients_impl
from tensorflow.python.ops import variables
from tensorflow.python.ops import variable_scope
from tensorflow.python.platform import benchmark
from tensorflow.python.platform import test
from tensorflow.python.platform import tf_logging as logging

import tensorflow as tf

# import matplotlib as mpl
# import matplotlib.pyplot as plt

try:
  from tfplus.flash_attn.python.ops.flash_attn_ops import FlashAttentionLayer
except:
  pass

# dump_plot_signal = False
# bench_result_dict = defaultdict(lambda:defaultdict(lambda:defaultdict(lambda:defaultdict(lambda:defaultdict(lambda:defaultdict(lambda:[]))))))
# max_x = 0
# max_y = 0
csv_writer = None

def randomcolor():
    colorArr = ['1','2','3','4','5','6','7','8','9','A','B','C','D','E','F']
    color ="#"+''.join([random.choice(colorArr) for i in range(6)])
    return color

@tf.function
def build_origin_graph(queries, keys, values, dtype=dtypes.float32, attention_layer=None, compute_grad=False):
  """Build a graph containing a sequence of FlashAttn operations.

  Args:

  Returns:

  """
  scores = tf.einsum('bthd,bshd->bhts', queries / math.sqrt(queries.shape[-1]), keys)
  attention = tf.nn.softmax(scores)
  outputs = tf.einsum('bhts,bshd->bthd', attention, values)
  if compute_grad:
    return list(
      itertools.chain.from_iterable([
        gradients_impl.gradients(outputs, i) for i in (queries, keys, values)
      ]))
  return outputs

def build_tf_plus_graph(queries, keys, values, dtype=dtypes.float32, attention_layer=None, compute_grad=False):
  """Build a graph containing a sequence of FlashAttn operations.

  Args:

  Returns:

  """
  if attention_layer is None:
    raise('attention_layer should not be None!')
  flash_attention_output = attention_layer(
      queries, keys, values)
  if compute_grad:
    return list(
      itertools.chain.from_iterable([
        gradients_impl.gradients(flash_attention_output, i) for i in (queries, keys, values)
      ]))
  return flash_attention_output

def build_tf_no_xla_graph(queries, keys, values, dtype=dtypes.float32, attention_layer=None, compute_grad=False):
  """Build a graph containing a sequence of FlashAttn operations.

  Args:

  Returns:

  """
  if attention_layer is None:
    raise('attention_layer should not be None!')
  attention_layer = tf.keras.layers.Attention(causal=True, use_scale=False, dtype=dtype)
  flash_attention_output = attention_layer(inputs=[queries, values, keys])
  if compute_grad:
    return list(
      itertools.chain.from_iterable([
        gradients_impl.gradients(flash_attention_output, i) for i in (queries, keys, values)
      ]))
  return flash_attention_output

@tf.function(jit_compile=True)
def build_tf_xla_graph(queries, keys, values, dtype=dtypes.float32, attention_layer=None, compute_grad=False):
  """Build a graph containing a sequence of FlashAttn operations.

  Args:

  Returns:

  """
  if attention_layer is None:
    raise('attention_layer should not be None!')
  flash_attention_output = attention_layer(inputs=[queries, values, keys])
  if compute_grad:
    return list(
      itertools.chain.from_iterable([
        gradients_impl.gradients(flash_attention_output, i) for i in (queries, keys, values)
      ]))
  return flash_attention_output

class TFOriginAttnBenchmark_t0_t1(test.Benchmark):
  """Benchmark FlashAttn!"""
  _build_graph_fn = staticmethod(build_origin_graph)

  def _run_graph(self, batch_size, seq_len_q, num_heads, head_dim, dtype, compute_grad=False):
    """Run the graph and print its execution time.

    Args:

    Returns:

    """
    graph = ops.Graph()
    with graph.as_default():
      str_lower = str(self._build_graph_fn).lower()
      # build input
      seq_len_v = seq_len_q
      queries = tf.random.normal(
        (batch_size, seq_len_q, num_heads, head_dim), dtype=dtype)
      keys = tf.random.normal(
          (batch_size, seq_len_v, num_heads, head_dim), dtype=dtype)
      values = tf.random.normal(
          (batch_size, seq_len_v, num_heads, head_dim), dtype=dtype)
      # build graph
      if "plus" in str_lower:
        attention_layer = FlashAttentionLayer(
          seq_len_q, seq_len_v, num_heads, head_dim, dtype=dtype)
        if dtype is dtypes.float32:
          return
      else:
        attention_layer = tf.keras.layers.Attention(causal=False, use_scale=False, dtype=dtype)
      outputs = self._build_graph_fn(queries, keys, values, dtype, attention_layer, compute_grad)
    # if hasattr(self._build_graph_fn, "name"):
    #   if "xla" in self._build_graph_fn.name.lower():
    #     print(self._build_graph_fn.get_concrete_function(batch_size, seq_len_q, num_heads, head_dim, dtype).graph.as_graph_def())
    # ir = self._build_graph_fn.experimental_get_compiler_ir(batch_size, seq_len_q, num_heads, head_dim, dtype)(stage='hlo')
    config = config_pb2.ConfigProto(graph_options=config_pb2.GraphOptions(
        optimizer_options=config_pb2.OptimizerOptions(
            opt_level=config_pb2.OptimizerOptions.ON_2)))
            # opt_level=config_pb2.OptimizerOptions.L0)))
    with session_lib.Session(graph=graph, config=config) as session:
      logging.set_verbosity(0)
      variables.global_variables_initializer().run()
      bench = benchmark.TensorFlowBenchmark()
      attention_matrix_computation = batch_size * 2 * seq_len_q * seq_len_q * num_heads * head_dim
      attention_over_values = batch_size * 2 * seq_len_q * seq_len_q * num_heads * head_dim
      dtype_byte = dtype.size
      bench_name = str(self.__class__).split(".")[-1].split("'")[0]
      try:
        bench_result = bench.run_op_benchmark(
            session,
            outputs,
            name=bench_name,
            mbs=(attention_matrix_computation + attention_over_values) * dtype_byte * 100 / 1e12,
            store_trace=True,
            store_memory_usage=True,
            extras={
                "batch_size": batch_size,
                "seq_len_q": seq_len_q,
                "num_heads": num_heads,
                "head_dim": head_dim,
                "dtype": dtype,
            })
        # global bench_result_dict
        # bench_dict = bench_result_dict[bench_name]
        # bs_dict = bench_dict[batch_size]
        # dtype_dict = bs_dict[dtype]
        # num_heads_dict = dtype_dict[num_heads]
        # head_dim_dict = num_heads_dict[head_dim]
        # head_dim_dict["seq_len"].append(seq_len_q)
        # head_dim_dict["throughput"].append(bench_result['throughput'])
        # head_dim_dict["GPUmem"].append(bench_result['extras']['allocator_maximum_num_bytes_GPU_0_bfc'])
      except:
        pass
    if "origin" in str(self._build_graph_fn).lower():
      tf.keras.backend.clear_session()
    # global dump_plot_signal, max_x, max_y
    global csv_writer
    #TODO 写一个自动递归
    time_now = datetime.now().strftime("%H:%M:%S")
    fig_dir = f'{os.getcwd()}/benchmark_figs'
    if not os.path.exists(fig_dir):
      os.makedirs(fig_dir)
    if csv_writer is None:
      header = ['bench_name', 'grad', 'batch_size', 'dtype', 'num_heads', 'head_dim', 'hidden_size', 'sequence_length', 'throughput(TByte/s)', 'allocator_maximum_num_bytes_GPU_0_bfc']
      global csv_file
      csv_file = open(f'{fig_dir}/attention_{time_now}.csv', 'w', encoding='utf-8')
      csv_writer = csv.writer(csv_file)
      csv_writer.writerow(header)
    if csv_writer is not None:
      try:
        bfc_gpu_byte = bench_result['extras']['allocator_maximum_num_bytes_GPU_0_bfc']
      except:
        bfc_gpu_byte = bench_result['extras']['allocator_maximum_num_bytes_gpu_async_0']
      csv_writer.writerow((bench_name, compute_grad, batch_size, dtype.name, num_heads, head_dim, num_heads*head_dim, seq_len_q, bench_result['throughput'], bfc_gpu_byte))
    # if dump_plot_signal is True:
    #   for bench_name, bench_dict in bench_result_dict.items():
    #     for batch_size, bs_dict in bench_dict.items():
    #       for dtype, dtype_dict in bs_dict.items():
    #         for num_heads, num_heads_dict in dtype_dict.items():
    #           for head_dim, head_dim_dict in num_heads_dict.items():
    #             x = head_dim_dict["seq_len"]
    #             y = head_dim_dict["throughput"]
    #             z = head_dim_dict["GPUmem"]
    #             for sl, tp, mem in zip(x, y, z):
    #               csv_writer.writerow((bench_name, batch_size, dtype.name, num_heads, head_dim, num_heads*head_dim, sl, tp, mem))
    #             plt.plot(
    #               x,
    #               y,
    #               color=randomcolor(),
    #               marker=".",
    #               linestyle="--",
    #               label=f'{bench_name}_bs{batch_size}_{dtype.name}_head{num_heads}_dim{head_dim}_hs{num_heads*head_dim}'
    #             )
    #             if max(x) > max_x:
    #               max_x = max(x)
    #             if max(y) > max_y:
    #               max_y = max(y)
    #             plt.xticks(x)
    #             plt.yticks(y)
    #   plt.legend(loc='best')
    #   plt.savefig(f'{fig_dir}/attention_{time_now}.png')

  def benchmark_FlashAttn(self):
    print("Attention Forward")
    # batch_size, seq_len_q, num_heads, head_dim
    test_input_list = [
      (2, 4096, 40, 128), # LLAMA 13B batch size 2 hidden size 5120
      (2, 4096, 16, 64), # Bert Large batch size 2 hidden size 1024
      (4096, 30, 40, 128), # 30day CTR hidden size 5120
      (4096, 30, 16, 64), # 30day CTR hidden size 1024
      (4096, 365, 16, 64), # 365day CTR hidden size 1024
      (4096, 30, 8, 16), # 30day CTR hidden size 128
      (4096, 365, 8, 16), # 365day CTR hidden size 128
    ]
    mat_dtypes = [dtypes.float32, dtypes.float16, dtypes.bfloat16]
    total_test = len(test_input_list) * len(mat_dtypes)
    test_iter = 0
    for test_input in test_input_list:
      for dtype in mat_dtypes:
        for compute_grad in (False, True):
          test_iter += 1
          if test_iter == total_test:
            global dump_plot_signal
            dump_plot_signal = True
          b, s, h, d = test_input
          self._run_graph(b, s, h, d, dtype, compute_grad)

class TFPlusAttnBenchmark_t1(TFOriginAttnBenchmark_t0_t1):
  _build_graph_fn = staticmethod(build_tf_plus_graph)

class TFNoXLAAttnBenchmark_t0_t1(TFOriginAttnBenchmark_t0_t1):
  _build_graph_fn = staticmethod(build_tf_no_xla_graph)

class TFXLAAttnBenchmark_t0(TFOriginAttnBenchmark_t0_t1):
  _build_graph_fn = staticmethod(build_tf_xla_graph)

if __name__ == "__main__":
  physical_devices = framework_config.list_physical_devices('GPU')
  if len(physical_devices):
    framework_config.set_visible_devices(physical_devices[0], 'GPU')
  # plt.title('Self-Attention Benchmark Result')
  # plt.xlabel('Sequence Length (tokens)')
  # plt.ylabel('Throughput (TByte/s)')
  test.main()
  global csv_file
  try:
    csv_file.close()
  except:
    pass

@Tixxx One more question, when using Keras Attention, query shape is (batch_size, seq_len_q, num_heads * head_dim). But FMHA only support shape (batch_size, seq_len_q, num_heads, head_dim). FMHA will never work.

@Tixxx One more question, when using Keras Attention, query shape is (batch_size, seq_len_q, num_heads * head_dim). But FMHA only support shape (batch_size, seq_len_q, num_heads, head_dim). But if use Keras MultiHeadAttention, it use einsum not matmul to calculate. FMHA will never work.!!! [Keras Attention]

Yea i think the tf.keras.layers.Attention is mainly for seq2seq models where one layer can only attend to 1 position, it's similar to an MHA with a single head, CUDNN lib supports single-headed MHAs but without hacking this keras api to give us the correct shape, XLA won't lower it. I think the keras.mha API might be a better option to develop transformer models, https://github.com/keras-team/keras/blob/v2.14.0/keras/layers/attention/multi_head_attention.py#L130-L731
Einsum will be lowered to a gemm eventually in xla so we are able to match it(Jax uses einsum too and we are able to match most of the jax MHA blocks). I checked the source code above for keras MHA, the shape is in the correct form. Maybe give it a try and let us know if that works?

@Tixxx Unfortunately, Einsum will be converted to triton kernel instead of cudnn matmul.


luci-base: http.uc: The limit for uploading 100k files is too small！！！

https://github.com/openwrt/luci/blob/master/modules/luci-base/ucode/http.uc#L17
The limit for uploading 100k files is too small，Files exceeding 100k cannot be uploaded under http!  Can you change it to not controlling the size of uploaded files?

The entire HTTP message body is held in RAM, hence the limit. Multi-megabyte uploads could easily trigger OOM conditions on the router. Use the cgi-upload applet to implement upload of large payload into temporary files. See the ui.uploadFile() implementation for an example on how to use it:
https://openwrt.github.io/luci/jsapi/ui.js.html#line4166


Assets with no content are created as null.js

When you have a pagelet with a completely empty js or css file they will be send as  {"css":["/null.js"],"js":["/null.js"] } to the client. These files will also be loading forever since they are not captured by the compiler and for some odd reason the 404 page isn't triggered.
To reproduce simply load a new Pagelet on an empty page. Set the css and js to an empty file that you've created using touch <filename>

Stil happening as of today.

Lol failed reference, anyway https://github.com/bigpipe/bigpipe/commit/0897c2a421758845be5e220b8c67d670d92ee014 will do the following to resolve this issue

always set content and hash on the file by resolving falsy file content to ''
prevent registering an empty file by simply returning if the !file.length
prevent returning undefined aliases and defaulting to false in stead of the file path on disk/orginal
added some compiler tests, \o/

released as 0.9.6, close this issue if you agree on things :)

Addendum, fittings experienced this issue by fragments being defaulted to '' which would also not update the file content and hash respectively.

Fix looks good to me, amazing work sir.


stricter Cartesian channel helpers

A bit of a rabbit hole here:

narrowing the return types of the Cartesian channel helpers from pull requests #80 and #391 requires restructuring them a bit internally
the resulting more restrictive and accurate checks no longer return a fallback value for the covariate encoding in the case of the single-bar layout, which now only (and correctly) has a encoder function for its sole quantitative channel
as a result of the preceding, the single-bar layout breaks

This can all be salvaged with a minor refactor of the barWidth() function to distinguish it from the step interval and explicitly handle the single-bar case, which is certainly a more sensible approach than relying on an implicit phantom channel.

It might still be a good idea to wrap up these ternaries in a function.

What would be an appropriate name for that function?


Reduce the amount of RAM used during compilation

On my machine building the Python package consumes more than 2 Gb of RAM, I guess because of heavily relying on C++ templates.
If there something we can do about it?

Oops, this is a duplicate of #39, closing.


Viewport camera won't rotate when pressing right mouse click while using a Wacom Tablet and Pen.

Tested versions
This is reproducible in any project in any version of godot.
System information
Windows 11 - Godot Engine v4.3.stable.official
Issue description
Viewport camera won't rotate when pressing right mouse click while using a Wacom Tablet and Pen. The right mouse button has to be configured to one of the pen buttons to test this.
When using a mouse the viewport camera rotates when pressing and moving a mouse. So it should have the same behavior when using a tablet for navigating.
This is quite a bummer for artists that use devices like Wacom tablet for pretty much any kind of work of navigation using a computer.
This is reproducible in any project in any version of godot.
Steps to reproduce
The right mouse button has to be configured to one of the pen buttons to test this.
When using a mouse the viewport camera rotates when pressing and moving a mouse. But won't work the same way with a pen and tablet.
Minimal reproduction project (MRP)
This is reproducible in any project in any version of godot.

It seems like that 4.3 broke some of the Wacom tablet compatibilities which should be the root of the issue. Upgrading my project to 4.3, I figured out that GetMousePosition() does NOT now reflect to position changes of pen position on tablet, which wasn't the case in 4.2.2. Curiously, motionEvent.Pressure and motionEvent.Tilt seem to still function, but the problem is with pen position. It seems that the issue we're experiencing must be rooted to changes introduced in PR #84708, which made Windows Ink tablet API the default tablet driver of Godot, instead of Wintab.

I'd like to add some information to this issue... I'm not sure if I should edit the Issue or create a new one, but I think the former might be more appropriate.
Somnia Lee reported that 4.3 broke some of the Wacom tablet compatibilities which should be the root of the issue. But that is not the only issue because even in 4.2 and older versions I could not rotate the camera viewport while click and holding the gizmo in the upper right corner properly (like I can in Blender).
Also when I middle mouse click in 4.2 or older versions the camera view will just kind of align with the y axis and rotate in circles very fast without control (in this viewport camera angle you'd only see the top part of the objects in view).

Have you set the correct Driver in Project Settings>Pen Tablet> Driver.windows?
I've had the same issue and changing this seems to have been the solution for me.

Hey @Borrgb, I've not been using godot much lately due to work so I can't remenber what I tried to do to fix this besides turning on "Emulate 3 Button Mouse" and now my viewport navigation with a wacom tablet is working perfectly. I also just tested turning this option off and I could also navigate around my scene. Also, choosing different drivers under  Project Settings>Pen Tablet> did not change anything with the tablet navigation on the viewport. The only thing that was not working correctly with any driver was the upper right viewport gizmo orbiting when pressing and dragging the pen. But that is very minor issue I guess.


[feature] Need unauthenticated source for omnictl or omnictl compatibility with older versions of omni

Problem Description
I need to be able to download or include an omnictl in an image that will work across our environments, even when those environments are on different versions of omni, without having to authenticate first, or using a non-interactive authentication method.
Solution
No response
Alternative Solutions
No response
Notes
No response

omnictl download is unauthenticated:
curl -LO https://<instance>.omni.siderolabs.io/omnictl/omnictl-linux-amd64

(other platforms/architectures also available)
Omni client code is open-source for building higher-level automation: https://github.com/siderolabs/omni-client


Stop worker

This PR contains

Refactoring of work inside StopEvent
Marking WorkerQueue and Worker functions as suspend as it was before. That's because original stop operation used a suspending function from Ably. I wanted to keep it compatible with original one.

Like some previous others there is no WorkResult or Result handler for this worker. If a need arises it will be covered in other PRs

I've created the issue for improving the blocking workers mechanism https://github.com/ably/ably-asset-tracking-android/issues/570 :wink:


Create Aircoin shill

Aircoin is very valuble coins in the future

Wonderful project

Good project

Aircoin good project

Aircoin is going to shock the world. You heard it first from me.

Nice project guys

This is an amazing project with great prospect. Don't miss out on this guys

Yet to understand how to fork a repo

Wonderful project

Yes
On Sun, 11 Jul 2021, 6:57 am 01Epic, @.***> wrote:

Yet to understand how to fork a repo
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/Aircoin-official/AirCash/pull/1#issuecomment-877746379,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARZOGGRYWTBFPW33FDR2TF3TXEXEFANCNFSM5ACNTP6Q
.

How?

I don't know.
On Sun, 11 Jul 2021, 7:22 am miraculous04, @.***> wrote:

How?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/Aircoin-official/AirCash/pull/1#issuecomment-877748617,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARZOGGTOYSDK7WJEDIU2JODTXE2BFANCNFSM5ACNTP6Q
.

Good project

AirCoins for life

yes I believe in the future
Pada tanggal Min, 18 Jul 2021 07.04, cantiir2 @.***>
menulis:

AirCoins for life
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/Aircoin-official/AirCash/pull/1#issuecomment-881976298,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AUY5KGRVKYYULC7PT4ZFU6DTYILBDANCNFSM5ACNTP6Q
.

Air is life
Aircoin is the future 💪


No "Export notes" option on Automatic Export page

Debug log ID
VIZJFCEN-refs-euc
What happened?
I would like to export notes along with references. However, the option to Export Notes is missing from the Automatic Export dialog in the configuration.

The Zotero extra field gets copied to CSL note, but Zotero items can have multiple rich-text notes, and the CSL-JSON spec doesn't accommodate these.

does that address your question?

So if I want to also export Notes, I need to use different format?

I have switched to BibLaTeX format and I see it now.


Guru Meditation Error: Core  1 when calling gslc_ElemSetTxtStr

Get a Guru meditation error with version 16.0.
I have traced this to a call to gslc_ElemSetTxtStr from my sketch, I perform the call as follows.
snprintf(acTxt, MAX_STR, "%s", myString);             //update acTxt with variable
gslc_ElemSetTxtStr(&m_gui, m_pElemWTime[i], acTxt);   //Update element ready to send to screen
(MAX_STR = 100 and number of characters within myString is around 22)
The code ran perfectly with GUIslice version 15.0.
Looking at your GUIslice.c code I see that the gslc_ElemSetTxtStr routine has changed.
You have moved:
if (pElem->nStrBufMax == 0) {
// String was read-only, so abort now
return;
}
to a new routine gslc_StrCopy called within gslc_ElemSetTxtStr , so it seems to me that if the above expression is true the remaining code in gslc_ElemSetTxtStr will still run.
I added
if (pElem->nStrBufMax == 0) {
// String was read-only, so abort now
return;
}
to gslc_ElemSetTxtStr and all my existing code runs correctly.
Hopefully I have supplied enough information.
Device hardware

MCU: ??? ESP32
Display with link: ??? ILI9486 3.5" RPI
GUIslice config selected: ??? `esp-tftespi-default-xpt2046_int

Thanks for reporting this and identifying the difference; much appreciated!
I’ll fix this up and likely roll it into a v0.16.1 release given its impact.

Hi @notascooby -- looking at the code again, I think the problem may have been triggered by the bad range in strncmp() around the code that you had identified.
I have pushed an update that should prevent this from occurring.
Please give the latest a try and let me know if it changes anything for you.
If it still causes an error, please attach your sketch so that I can ensure I am testing the same condition as you.
thanks

Yes, the update works correctly - thanks


Bug Regarding Placing Objects into Scene(s)

Every time I place an object into the scene, it always goes into the RCSG-Model.

Fixed in 1.546. I'll close this ticket once it's available on the asset store

The realtime csg version that contains this fix is available from the asset store so I'll close this ticket


[Bugfix] Take the VRAM usage of prompt_logprobs into account

As mentioned in #5067 , current profiler and scheduler logic do not consider the VRAM usage of computing log probabilities, which can consume up to 7.8 GB VRAM. This PR introduces a new engine arg called max_num_batched_logprobs, with its default value to max_seqs for simplicity, and take it into account in the profiler and scheduler logic.
Specifically, in profile_run, sampling params of the first $k$ prompt are set to prompt_logprobs=1, where $k=\lceil\frac{max\ num\ batched\ logprobs}{tokens}\rceil$. Then in scheduler.py, a new variable called logprob_budget is added into SchedulingBudget to track the number of tokens that require logprobs.
A simple unit test is added into test_logprobs.py for testing this new engine arg.

 PR Checklist (Click to Expand)
Thank you for your contribution to vLLM! Before submitting the pull request, please ensure the PR meets the following criteria. This helps vLLM maintain the code quality and improve the efficiency of the review process.
PR Title and Classification
Only specific types of PRs will be reviewed. The PR title is prefixed appropriately to indicate the type of change. Please use one of the following:

[Bugfix] for bug fixes.
[CI/Build] for build or continuous integration improvements.
[Doc] for documentation fixes and improvements.
[Model] for adding a new model or improving an existing model. Model name should appear in the title.
[Frontend] For changes on the vLLM frontend (e.g., OpenAI API server, LLM class, etc.)
[Kernel] for changes affecting CUDA kernels or other compute kernels.
[Core] for changes in the core vLLM logic (e.g., LLMEngine, AsyncLLMEngine, Scheduler, etc.)
[Hardware][Vendor] for hardware-specific changes. Vendor name should appear in the prefix (e.g., [Hardware][AMD]).
[Misc] for PRs that do not fit the above categories. Please use this sparingly.

Note: If the PR spans more than one category, please include all relevant prefixes.
Code Quality
The PR need to meet the following code quality standards:

We adhere to Google Python style guide and Google C++ style guide.
Pass all linter checks. Please use format.sh to format your code.
The code need to be well-documented to ensure future contributors can easily understand the code.
Include sufficient tests to ensure the project to stay correct and robust. This includes both unit tests and integration tests.
Please add documentation to docs/source/ if the PR modifies the user-facing behaviors of vLLM. It helps vLLM user understand and utilize the new features or changes.

Notes for Large Changes
Please keep the changes as concise as possible. For major architectural changes (>500 LOC excluding kernel/data/config/test), we would expect a GitHub issue (RFC) discussing the technical design and justification. Otherwise, we will tag it with rfc-required and might not go through the PR.
What to Expect for the Reviews
The goal of the vLLM team is to be a transparent reviewing machine. We would like to make the review process transparent and efficient and make sure no contributor feel confused or frustrated. However, the vLLM team is small, so we need to prioritize some PRs over others. Here is what you can expect from the review process:

 After the PR is submitted, the PR will be assigned to a reviewer. Every reviewer will pick up the PRs based on their expertise and availability.
 After the PR is assigned, the reviewer will provide status update every 2-3 days. If the PR is not reviewed within 7 days, please feel free to ping the reviewer or the vLLM team.
 After the review, the reviewer will put an  action-required label on the PR if there are changes required. The contributor should address the comments and ping the reviewer to re-review the PR.
 Please respond to all comments within a reasonable time frame. If a comment isn't clear or you disagree with a suggestion, feel free to ask for clarification or discuss the suggestion.

Thank You
 Finally, thank you for taking the time to read these guidelines and for your interest in contributing to vLLM. Your contributions make vLLM a great tool for everyone!

BTW, I found another bug in the sampler while testing this feature. When some sequences are preempted (which is common when the size of the KV cache is insufficient), the sampling_metadata becomes inconsistent with the new input, resulting in:
File "vllm/model_executor/layers/sampler.py", line 760, in _get_logprobs
[rank0]:     assert len(next_token_ids) == len(query_indices)
[rank0]: AssertionError

This bug appears to be unrelated to my changes, as it also occurs in the original code. I would like to fix it, but I am currently busy looking for a research internship, so I may work on it later.

BTW, I found another bug in the sampler while testing this feature. When some sequences are preempted (which is common when the size of the KV cache is insufficient), the sampling_metadata becomes inconsistent with the new input, resulting in:
File "vllm/model_executor/layers/sampler.py", line 760, in _get_logprobs
[rank0]:     assert len(next_token_ids) == len(query_indices)
[rank0]: AssertionError

This bug appears to be unrelated to my changes, as it also occurs in the original code. I would like to fix it, but I am currently busy looking for a research internship, so I may work on it later.

I think this will be fixed by https://github.com/vllm-project/vllm/pull/5349

I think this will be fixed by #5349

Thank you for mentioning that. I apologize for not catching that earlier. I'll check #5349 to see if it resolves the issue.

The modifications to the scheduler logic have issues, causing the tests to fail. Let me fix this now and submit a new commit shortly.

Thanks for taking this on!

I have carefully reviewed the failed checks and confirmed that they are not caused by my changes.
@robertgshaw2-neuralmagic could you please review this PR? Thank you!

@Conless I tried using this PR to perform an evaluation on MMLU (where it is easy to run into the existing OOM issue because of the large number of logprobs required) and this PR seems to completely prevent that evaluation from working now. For context, the previous method of failure on main was just if the batch size was too large or memory utilization was too high, we would hit OOM trying to allocate dynamic structures to hold the logprobs.
The key issue seems to be the triggering of:
WARNING 06-10 17:21:28 scheduler.py:728] Input prompt (3082 tokens) is too long and exceeds limit of 256

If I reduce the --num_fewshot parameter to 0, I still get a smaller:
WARNING 06-10 17:30:17 scheduler.py:728] Input prompt (985 tokens) is too long and exceeds limit of 256

I thought this PR would enable the scheduler to make space for logprobs and not "over-allocate" for subsequent requests coming in. Or at least make vLLM aware of the "leftover" memory it has available and do some work of managing that in tandem with kv cache blocks to decide how to schedule the requests coming in. I believe this current method of having a fixed number is not sufficient and doesn't scale when we do have enough memory available to run the request.
The following are steps to reproduce.
Install lm-evaluation-harness:
git clone https://github.com/EleutherAI/lm-evaluation-harness.git
pip install -e lm-evaluation-harness

Eval:
lm_eval --model vllm --model_args pretrained=meta-llama/Meta-Llama-3-8B-Instruct --tasks mmlu --num_fewshot 5

INFO 06-10 17:17:56 llm_engine.py:161] Initializing an LLM engine (v0.4.3) with config: model='meta-llama/Meta-Llama-3-8B-Instruct', speculative_config=None, tokenizer='meta-llama/Meta-Llama-3-8B-Instruct', skip_tokenizer_init=False, tokenizer_mode=auto, revision=None, rope_scaling=None, tokenizer_revision=None, trust_remote_code=False, dtype=torch.bfloat16, max_seq_len=8192, download_dir=None, load_format=LoadFormat.AUTO, tensor_parallel_size=1, disable_custom_all_reduce=False, quantization=None, enforce_eager=False, kv_cache_dtype=auto, quantization_param_path=None, device_config=cuda, decoding_config=DecodingConfig(guided_decoding_backend='outlines'), seed=1234, served_model_name=meta-llama/Meta-Llama-3-8B-Instruct)
INFO 06-10 17:17:57 weight_utils.py:221] Using model weights format ['*.safetensors']
INFO 06-10 17:18:01 model_runner.py:157] Loading model weights took 14.9595 GB
INFO 06-10 17:18:01 gpu_executor.py:83] # GPU blocks: 27318, # CPU blocks: 2048
INFO 06-10 17:18:02 model_runner.py:887] Capturing the model for CUDA graphs. This may lead to unexpected consequences if the model is not static. To run the model in eager mode, set 'enforce_eager=True' or use '--enforce-eager' in the CLI.
INFO 06-10 17:18:02 model_runner.py:891] CUDA graphs can take additional 1~3 GiB memory per GPU. If you are running out of memory, consider decreasing `gpu_memory_utilization` or enforcing eager mode. You can also reduce the `max_num_seqs` as needed to decrease memory usage.
INFO 06-10 17:18:06 model_runner.py:957] Graph capturing finished in 4 secs.
...
WARNING 06-10 17:21:28 scheduler.py:728] Input prompt (3082 tokens) is too long and exceeds limit of 256
[rank0]: Traceback (most recent call last):
[rank0]:   File "/home/mgoin/venvs/vllm/bin/lm_eval", line 8, in <module>
[rank0]:     sys.exit(cli_evaluate())
[rank0]:   File "/home/mgoin/code/lm-evaluation-harness/lm_eval/__main__.py", line 369, in cli_evaluate
[rank0]:     results = evaluator.simple_evaluate(
[rank0]:   File "/home/mgoin/code/lm-evaluation-harness/lm_eval/utils.py", line 346, in _wrapper
[rank0]:     return fn(*args, **kwargs)
[rank0]:   File "/home/mgoin/code/lm-evaluation-harness/lm_eval/evaluator.py", line 276, in simple_evaluate
[rank0]:     results = evaluate(
[rank0]:   File "/home/mgoin/code/lm-evaluation-harness/lm_eval/utils.py", line 346, in _wrapper
[rank0]:     return fn(*args, **kwargs)
[rank0]:   File "/home/mgoin/code/lm-evaluation-harness/lm_eval/evaluator.py", line 442, in evaluate
[rank0]:     resps = getattr(lm, reqtype)(cloned_reqs)
[rank0]:   File "/home/mgoin/code/lm-evaluation-harness/lm_eval/api/model.py", line 370, in loglikelihood
[rank0]:     return self._loglikelihood_tokens(new_reqs, disable_tqdm=disable_tqdm)
[rank0]:   File "/home/mgoin/code/lm-evaluation-harness/lm_eval/models/vllm_causallms.py", line 414, in _loglikelihood_tokens
[rank0]:     answer = self._parse_logprobs(
[rank0]:   File "/home/mgoin/code/lm-evaluation-harness/lm_eval/models/vllm_causallms.py", line 459, in _parse_logprobs
[rank0]:     continuation_logprobs_dicts = [
[rank0]: TypeError: 'NoneType' object is not iterable
Running loglikelihood requests:   0%|                                                                                | 0/56168 [00:01<?, ?it/s]

@mgoin Sorry for the late reply. I was busy handling other stuff these days.

this PR seems to completely prevent that evaluation from working now.

To handle long requests with prompt_logprobs, you may increase max_num_batched_logprobs to change the limit. I left this argument for users to customize VRAM limitations. Additionally, I can add support to determine the default value based on VRAM usage, which may be helpful in your case.

I thought this PR would enable the scheduler to make space for logprobs and not "over-allocate" for subsequent requests coming in.

I'm not sure if I fully understand your point. Actually, I don't think this design conflicts with your idea. The current logic is as follows:

Run the profiler with the maximum number of logprobs. We do not allocate space for the sampler after the profile run, but we determine a reasonable configuration for the KV cache to prevent OOM.
When requests come in, the scheduler takes actions to ensure the total number of logprobs being computed does not exceed the limit. Then the VRAM would be allocated when the sampler works.

A possible improvement is to balance the KV cache and the number of logprobs in each iteration. However, that would be quite difficult since the KV cache is allocated statically.

Hi thanks for the great work, it will fix a lot of OOM errors when we run prompt logprobs. Do you have any ETA on when it will get merged?

Hi thanks for the great work, it will fix a lot of OOM errors when we run prompt logprobs. Do you have any ETA on when it will get merged?

Sorry I’m busy with some other works these days.
As what is mentioned above, to implement a more fine-grained management, which may be expected by maintainers, requires some more work in memory management. Thus it may be hard to finish it soon.
If this bug also bothers you, we may work on it together. I’m looking forward to collaborators!


Why not D3?

https://runemadsen.github.io/rune.js/about.html#why-not- lists the "why not" of this library, and lists several inspirations for it including D3, but doesn't describe what this library has that D3 doesn't.

Good point. I should add that. I think the biggest thing is that to use D3, you need to know about the DOM and the SVG element and its attributes. To use Rune.js, you don't need to. So people coming from Processing / P5.js will pick up Rune.js while D3 will be quite a challenge. I have taught D3 to students before, and its API is highly cryptic to beginners. And then on top of that come things such as grid system, debug mode, etc.


Update Azure.Provisioning to latest version

Update to the new Azure.Provisioning libraries.
Fix #5583
cc @mitchdenny @davidfowl @tg-msft @JoshLove-msft
Checklist

Is this feature complete?

[ ] Yes. Ready to ship.
[x] No. Follow-up changes expected.

Are you including unit tests for the changes and scenario tests if relevant?

[x] Yes
[ ] No

Did you add public API?

[x] Yes

If yes, did you have an API Review for it?

[ ] Yes
[x] No

Did you add <remarks /> and <code /> elements on your triple slash comments?

[ ] Yes
[x] No

[ ] No

Does the change make any security assumptions or guarantees?

[ ] Yes

If yes, have you done a threat model and had a security review?

[ ] Yes
[ ] No

[x] No

Does the change require an update in our Aspire docs?

[x] Yes

Link to aspire-docs issue:

[ ] No

Microsoft Reviewers: Open in CodeFlow

This should now be ready for a review from folks. Tests are updated. I verified the bicep changes as much as I could. The cdk playground app can be deployed to Azure.

/azp run

Tests are broken becuase I need to update the test nuget.config file for the new feed.
@radical - is it possible to not have the duplicate test nuget.config?

OK, I think this PR is ready for final review and can be merged to unblock other work.
There are follow up issues on the CDK we can make later.

Default ResourceVersions for all resources.
TimeSpan formatting for ServiceBus
WebPubSub roles
.Value! fix ups and using Expressions as workarounds.

OK I've done a full pass over this now. Its looking really good. I've left a few comments but the themes are:

Resource name consistency between Aspire 8.0 and Aspire 9.0 (really important unless we've got a good reason to break it.
Resource API version regressions in some areas (just need to understand why, and whether its going to cause problems. Would probably pay to deploy playground/cdk sample using 8.0 and 9.0 to the same target resource group and make sure it deploys cleanly (if the resource names line up and the config settings that change are mutable it should work fine.

Not specifically called out in comments above, but some of this has got a lot more verbose. That isn't a problem provided we provide really good documentation.

/azp run


CurveRange Attribute

Heyo! Just another feature added! CurveRange is used to limit AnimationCurve bounds so designers can work within reasonable ranges.
I didn't push the update to your upm branch since I think you sync the branches with your own script.
Lemme know if you've got questions!

Thanks mate. I first merge pull requests in the v2 branch and then merge them to the master branch. After that the upm automatically updates. I will try to merge this in the weekend

Merged into the v2 branch 753c7b5b2ae7bd85588be3442665595314ffad7f


Other hacktoberfest starter repository

https://github.com/ezralazuardy/hacktoberfest

@ezralazuardy   thanks for making your first contribution, Look at the issues so that you can get a chance to win a limited community Swag from me.
If you like the project and Repo please give it a star and Follow me on Github (would be appreciated)


Execution failed for task ':app:compileDebugKotlin'.

I get the following error while running the program
Launching lib\main.dart on Android SDK built for x86 in debug mode...

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileDebugKotlin'.
> Could not resolve all artifacts for configuration ':app:debugCompileClasspath'.
   > Could not download x86_debug.jar (io.flutter:x86_debug:1.0.0-6bc433c6b6b5b98dcf4cc11aff31cdee90849f32)
      > Could not get resource 'https://storage.googleapis.com/download.flutter.io/io/flutter/x86_debug/1.0.0-6bc433c6b6b5b98dcf4cc11aff31cdee90849f32/x86_debug-1.0.0-6bc433c6b6b5b98dcf4cc11aff31cdee90849f32.jar'.
         > Could not GET 'https://storage.googleapis.com/download.flutter.io/io/flutter/x86_debug/1.0.0-6bc433c6b6b5b98dcf4cc11aff31cdee90849f32/x86_debug-1.0.0-6bc433c6b6b5b98dcf4cc11aff31cdee90849f32.jar'.
            > Connect to storage.googleapis.com:443 [storage.googleapis.com/<IP_ADDRESS>] failed: Connection timed out: connect
   > Could not download x86_64_debug.jar (io.flutter:x86_64_debug:1.0.0-6bc433c6b6b5b98dcf4cc11aff31cdee90849f32)
      > Could not get resource 'https://storage.googleapis.com/download.flutter.io/io/flutter/x86_64_debug/1.0.0-6bc433c6b6b5b98dcf4cc11aff31cdee90849f32/x86_64_debug-1.0.0-6bc433c6b6b5b98dcf4cc11aff31cdee90849f32.jar'.
         > Could not GET 'https://storage.googleapis.com/download.flutter.io/io/flutter/x86_64_debug/1.0.0-6bc433c6b6b5b98dcf4cc11aff31cdee90849f32/x86_64_debug-1.0.0-6bc433c6b6b5b98dcf4cc11aff31cdee90849f32.jar'.
            > Connect to storage.googleapis.com:443 [storage.googleapis.com/<IP_ADDRESS>] failed: Connection timed out: connect

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 19s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

>flutter doctor -v
[√] Flutter (Channel stable, v1.17.1, on Microsoft Windows [Version 10.0.18363.836], locale zh-CN)
    • Flutter version 1.17.1 at D:\my-tools\flutter
    • Framework revision f7a6a7906b (3 days ago), 2020-05-12 18:39:00 -0700
    • Engine revision 6bc433c6b6
    • Dart version 2.8.2

[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at D:\my-tools\Android\sdk
    • Platform android-29, build-tools 29.0.3
    • ANDROID_HOME = D:\my-tools\Android\sdk
    • Java binary at: D:\my-tools\Android\AndroidStudio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
    X Android license status unknown.
      Try re-installing or updating your Android SDK Manager.
      See https://developer.android.com/studio/#downloads or visit visit
      https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions.

[√] Android Studio (version 3.6)
    • Android Studio at D:\my-tools\Android\AndroidStudio
    • Flutter plugin version 45.1.1
    • Dart plugin version 192.8052
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)

[√] Connected device (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)

! Doctor found issues in 1 category.

I used flutter downgrade to downgrade to v1.17.0, the error disappeared

duplicate of https://github.com/flutter/flutter/issues/53070


docs: Split deprecated spec versions from stable ones

This clarifies that they should not be used and that they will be
removed in a future major release.

Filed https://github.com/coreos/butane/issues/257 to track removal of the spec.


thread safety

The connection decrement in ConnectionPool.cache() is NOT thread safe (asyncmongo/pool.py: 129)
It probably needs to be in the lock.
http://effbot.org/pyfaq/what-kinds-of-global-value-mutation-are-thread-safe.htm
http://mail.python.org/pipermail/python-dev/2006-November/thread.html#69981
http://www.velocityreviews.com/forums/t632419-atomic-increment.html

@steamraven asyncmongo isn't really designed to be threadsafe, it's designed to be used in a single thread on a tornado io_loop.


Identify the list of Prototypes

I think the following prototypes are required.

Workflow to Convert a video in S3 Text.
Format to mark-up video with speaker and time.
Format to identify voice imprints in the video.


Upgrade to Laravel 10.x

Codecov Report
Base: 96.84% // Head: 96.55% // Decreases project coverage by -0.30% :warning:

Coverage data is based on head (0e2e3e5) compared to base (d7dc7a9).
Patch has no changes to coverable lines.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
Additional details and impacted files
@@             Coverage Diff              @@
##               main       #6      +/-   ##
============================================
- Coverage     96.84%   96.55%   -0.30%
  Complexity       36       36
============================================
  Files             3        3
  Lines            95       87       -8
============================================
- Hits             92       84       -8
  Misses            3        3

Impacted Files
Coverage Δ

src/Components/Combobox.php
92.68% <0.00%> (-0.66%)
:arrow_down:

src/ComboboxServiceProvider.php
100.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


删除to type方法,使用泛型方法

1. Does this PR affect any open issues?(Y/N) and add issue references (e.g. "fix #123", "re #123".):

[X] N
[ ] Y

2. What is the scope of this PR (e.g. component or file name):

kclvm.go
kclvm_test.go
pkg/kcl/api.go
pkg/kcl/api_test.go
pkg/native/api.go
3. Provide a description of the PR(e.g. more details, effects, motivations or doc link):

[ ] Affects user behaviors
[ ] Contains syntax changes
[ ] Contains variable changes
[ ] Contains experimental features
[ ] Performance regression: Consumes more CPU
[ ] Performance regression: Consumes more Memory
[X] Other

4. Are there any breaking changes?(Y/N) and describe the breaking changes(e.g. more details, motivations or doc link):

[ ] N
[X] Y

5. Are there test cases for these changes?(Y/N) select and add more details, references or doc links:

[X] Unit test
[ ] Integration test
[ ] Benchmark (add benchmark stats below)
[ ] Manual test (add detailed scripts or steps below)
[ ] Other

@Peefy<EMAIL_ADDRESS>Run() 方法无法支持这个pr，我想把Run()方法返回(*kcl.KCLResultList, error)改成(*kcl.KCLResultList[kcl.KCLResultType], error)，如何为这个仓库提交pr

https://github.com/kcl-lang/kpm

https://github.com/kcl-lang/kpm

死循环了,kpm依赖这个pr


Exercise 4.9 Run exercise 1 from Exercise section to create johnDoe.

Exercise 4.9 Run exercise 1 from Exercise section to create johnDoe. How many dead bodies were discovered after year 2012 (exclude 2012)?

How should I do to solve this problem?
Error: Client error: (403) PERMISSION_DENIED * Client does not have sufficient permission. This can happen because the OAuth token does not have the right scopes, the client doesn't have permission, or the API has not been enabled for the client project. * Request had insufficient authentication scopes. Run rlang::last_error() to see where the error occurred.

How should I do to solve this problem?
Error: Client error: (403) PERMISSION_DENIED * Client does not have sufficient permission. This can happen because the OAuth token does not have the right scopes, the client doesn't have permission, or the API has not been enabled for the client project. * Request had insufficient authentication scopes. Run rlang::last_error() to see where the error occurred.

@raychiu135 I updated the textbook. Please try again. If there is still problem, follow https://github.com/tpemartin/110-1-r4ds-main/issues/48 to fix the error.

Thanks a lot!

https://github.com/raychiu135/110-1-r4ds-main/blob/314ccf3565b59a4c44848610427731d349ffef65/exercise_4.9.rmd#L2

https://github.com/linttttt/110-1-r4ds-main/blob/63b866865f5c68596af5a38200bd4acdb4369b3d/studyCH4(EX).Rmd#L62

https://github.com/32119811/110-1-r4ds-main/blob/d140f3d568b677af691b43ec608731c8f2e58469/Exercise 4.9#L2

@linttttt,
Please check:
The question excludes 101, >= should be >
yearPick <- johnDoe$data[["發現年"]] >= 101

@32119811 check
johnDoe_discovery <- johnDoe[["data"]][["發現年"]] > ("2002")
# the same as
johnDoe$data$發現年 |> as.character() > "2002"

When comparing characters, your computer system's collateral setup (collating sequence) determines the outcome.

For character of numbers, like "0", "1", "2",.., "9". "0" is the smallest and "9" is the largest.

When there are multiple bytes, like "42" (2 bytes), "232" (3 bytes), if the first byte of the string wins, then that whole string wins. The first byte of "42" is "4", and the first byte ot "232" is "2"; "4" defeats "2", so "42" is larger than "232"

"42" > "232"

c("74", "99" , "100", "102", "104") which will defeat "101"

c("74", "99" , "100", "102", "104") > "101"

johnDoe$data$發現年 |> range()
johnDoe$data$發現年 |> range(na.rm=T)
johnDoe$data$發現年 %in% 73:99 |> sum()

https://github.com/AmyChen20021003/110-1-r4ds-main/blob/1ed15acbf583e52352b7d7fb7ed93a585f488683/4-9.Rmd#L13

https://github.com/Vincent23412/110-1-r4ds-main/blob/22fd3b28e9ff751adbf7f00a6e7b3f37c60d14d0/20211212.Rmd#L10


formatCodeOptions are ignored

It seems that formatCodeOptions in tsconfig.json are simply ignored.
setting intent size, tabsize or newlinechar doesn't affect the output.
Without compilerOptions, files and so on, my tsconfig.json looks as follows
{
  "formatCodeOptions": {
    "IndentSize": 2,
    "TabSize": 2,
    "newLineCharacter": "\n"
  }
}

Looks like this might have been a regression.
Changing "formatCodeOptions" to "format" caused it to work again on my system. (Plugin version 1.3.2)

doesn't affect the output.

Just to clarify: do you mean JS output or formatting commands output

Yes, exactly. Sorry I didn't pointed this out.

Yes, exactly. Sorry I didn't pointed this out.

Again: do you mean JS output or formatting commands output :heart:

Oh damn that was an either-or question. I'm so sorry!
I meant the js output.

Cool. Its not designed to impact the JS output. Its designed for format TypeScript. I've updated the docs to clarify. There is no plan to control JS output formatting at the moment. Perhaps take it up with https://github.com/Microsoft/TypeScript :rose:


mkvtoolnix latest is not 29.0 but 31.0

I've tried to create the manifest but it timed out
Couldn't submit manifest Request to https://octobot.appget.net/pr has timed out.

Attaching it here mkvtoolnix.yaml.zip

Thanks Igor :D, I've updated the manifest to point to the direct downloads,
https://github.com/appget/appget.packages/pull/3015/files


Resolved conflicts in stdInt while compiling in Visual Studio 2010

stdint.h is available starting with Visual Studio 2010, so we must include it
because others headers will include it and cause conflicts
(at least redefenition error of int_fast16_t and uint_fast16_t)

I'm assuming you're building client applications or plugins with MSVC 10, since the core itself will definitely not compile with MSVC 10. If you've gotten the stdint.h in msvc10 to work, then more power to you: if you just want to let me know that you've tried this and it works for your use case I'll gladly merge it.

Yes, it perfectly works when building the client applications using vc10 compiler. And yes i knew that for compiling the core sdk the commit does not  make much sense

I am using only a small subset of the client api though and had not tried yet writing any plugins, so theoretically here might be any problems in some parts of client api with compilation on vs10

Sounds good. I had just in the past but been able to actually get stdint in vc10 to actually work, which is why I wanted the double check, that's all. Thanks a bunch for the contribution, hope to hear more from you! If you're not already, please join the dev discussion mailing list

(I've actually built osvr apps using vc9, so yes, that's certainly an intended use case for the c API)